OPENSSL_strnlen

Return the length of str, limited to at most maxlen bytes.

Synopsis

Declared in <openssl/crypto.h>

size_t
OPENSSL_strnlen(
    char const* str,
    size_t maxlen);

Return Value

Number of non-NUL bytes before the first NUL, or maxlen if none is found.

Parameters

NameDescription
strPossibly non-NUL-terminated buffer to measure.
maxlenMaximum number of bytes to examine.