From: Emilia Kasper Date: Thu, 17 Sep 2015 11:55:09 +0000 (+0200) Subject: Document BUF_strnlen X-Git-Tag: OpenSSL_1_0_2e~73 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=51ff683c12104f667c33f37c1fdb35ab47571ea1;p=oweals%2Fopenssl.git Document BUF_strnlen Reviewed-by: Matt Caswell (cherry picked from commit 21b0fa91186ff1c1c3d956c0593ef4ac02521695) --- diff --git a/doc/crypto/buffer.pod b/doc/crypto/buffer.pod index 9d6de53e8e..52c5c841eb 100644 --- a/doc/crypto/buffer.pod +++ b/doc/crypto/buffer.pod @@ -28,6 +28,8 @@ standard C library equivalents size_t BUF_strlcat(char *dst, const char *src, size_t size); + size_t BUF_strnlen(const char *str, size_t maxlen); + =head1 DESCRIPTION The buffer library handles simple character arrays. Buffers are used for @@ -42,11 +44,11 @@ BUF_MEM_grow() changes the size of an already existing buffer to B. Any data already in the buffer is preserved if it increases in size. -BUF_strdup(), BUF_strndup(), BUF_memdup(), BUF_strlcpy() and -BUF_strlcat() are equivalents of the standard C library functions. The -dup() functions use OPENSSL_malloc() underneath and so should be used -in preference to the standard library for memory leak checking or -replacing the malloc() function. +BUF_strdup(), BUF_strndup(), BUF_memdup(), BUF_strlcpy(), +BUF_strlcat() and BUF_strnlen are equivalents of the standard C +library functions. The dup() functions use OPENSSL_malloc() underneath +and so should be used in preference to the standard library for memory +leak checking or replacing the malloc() function. Memory allocated from these functions should be freed up using the OPENSSL_free() function.