mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
110f7b37de
BUF_strndup was calling strlen through BUF_strlcpy, and ended up reading past the input if the input was not a C string. Make it explicitly part of BUF_strndup's contract to never read more than |siz| input bytes. This augments the standard strndup contract to be safer. The commit also adds a check for siz overflow and some brief documentation for BUF_strndup(). Reviewed-by: Matt Caswell <matt@openssl.org> |
||
---|---|---|
.. | ||
buf_err.c | ||
buf_str.c | ||
buffer.c | ||
Makefile |