diff options
Diffstat (limited to 'thirdparties/common/include/openssl/buffer.h')
-rw-r--r--[-rwxr-xr-x] | thirdparties/common/include/openssl/buffer.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/thirdparties/common/include/openssl/buffer.h b/thirdparties/common/include/openssl/buffer.h index c343dd7..efd240a 100755..100644 --- a/thirdparties/common/include/openssl/buffer.h +++ b/thirdparties/common/include/openssl/buffer.h @@ -86,7 +86,13 @@ int BUF_MEM_grow(BUF_MEM *str, size_t len); int BUF_MEM_grow_clean(BUF_MEM *str, size_t len); size_t BUF_strnlen(const char *str, size_t maxlen); char *BUF_strdup(const char *str); + +/* + * Like strndup, but in addition, explicitly guarantees to never read past the + * first |siz| bytes of |str|. + */ char *BUF_strndup(const char *str, size_t siz); + void *BUF_memdup(const void *data, size_t siz); void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz); |