diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-07-13 15:41:34 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-07-13 15:41:34 +0000 |
commit | 3d499ea9bb9411697686cfe049a79a00b1c660bc (patch) | |
tree | 936c924f940399e4949532647d2b977093ffeb13 | |
parent | b148809783f14fe4ed637444d371076643a9cae5 (diff) |
Warn about the use of BUF_strdup.
-rw-r--r-- | lib/libssl/src/doc/crypto/BUF_MEM_new.pod | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libssl/src/doc/crypto/BUF_MEM_new.pod b/lib/libssl/src/doc/crypto/BUF_MEM_new.pod index a83f46f8968..28057558692 100644 --- a/lib/libssl/src/doc/crypto/BUF_MEM_new.pod +++ b/lib/libssl/src/doc/crypto/BUF_MEM_new.pod @@ -45,10 +45,12 @@ B<len>. Any data already in the buffer is preserved if it increases in size. BUF_strdup() copies a null terminated string into a block of allocated memory -and returns a pointer to the allocated block. +and returns a pointer to the allocated block. Unlike the system strdup() +function, BUF_strdup() will accept a NULL argument and will return NULL in +that case. Its use in new programes is discouraged. The memory allocated from BUF_strdup() should be freed up using the -OPENSSL_free() function. +free() function. =head1 RETURN VALUES |