strnlen_user

Name

strnlen_user --  Get the size of a string in user space.

Synopsis

long strnlen_user (const char * s, long n);

Arguments

s

-- undescribed --

n

The maximum valid length

Description

Get the size of a NUL-terminated string in user space.

Returns the size of the string INCLUDING the terminating NUL. On exception, returns 0. If the string is too long, returns a value greater than n.