openssl/crypto/buffer
Alessandro Ghedini 110f7b37de Make BUF_strndup() read-safe on arbitrary inputs
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>
2015-09-22 19:50:53 +02:00
..
buf_err.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
buf_str.c Make BUF_strndup() read-safe on arbitrary inputs 2015-09-22 19:50:53 +02:00
buffer.c remove 0 assignments. 2015-09-03 16:26:34 -04:00
Makefile Fix the update target and remove duplicate file updates 2015-05-22 18:44:33 +02:00