diff options
author | Emilia Kasper <emilia@openssl.org> | 2015-09-17 13:27:05 +0200 |
---|---|---|
committer | Emilia Kasper <emilia@openssl.org> | 2015-09-22 20:04:01 +0200 |
commit | f5afe9ce3f7ab8d2fef460054d1170427db0d02c (patch) | |
tree | 0ce553523ddf7b4f4cbad881e44b96181001462b /crypto/buffer/buffer.h | |
parent | f61216ba9d17430fb5eb3e2b202a209960b9d51b (diff) | |
download | openssl-f5afe9ce3f7ab8d2fef460054d1170427db0d02c.tar.gz |
BUF_strndup: tidy
Fix comment, add another overflow check, tidy style
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit de8883e11befde31d9b6cfbbd1fc017c365e0bbf)
Diffstat (limited to 'crypto/buffer/buffer.h')
-rw-r--r-- | crypto/buffer/buffer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/buffer/buffer.h b/crypto/buffer/buffer.h index a05cee091f..efd240a5f9 100644 --- a/crypto/buffer/buffer.h +++ b/crypto/buffer/buffer.h @@ -88,8 +88,8 @@ size_t BUF_strnlen(const char *str, size_t maxlen); char *BUF_strdup(const char *str); /* - * Returns a pointer to a new string which is a duplicate of the string |str|, - * but guarantees to never read past the first |siz| bytes of |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); |