Alessandro Ghedini
6905187488
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>
(cherry picked from commit 110f7b37de9feecfb64950601cc7cec77cf6130b)
(cherry picked from commit f61216ba9d17430fb5eb3e2b202a209960b9d51b)
2015-09-22 20:09:38 +02:00
..
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-21 17:33:06 -04:00
2015-09-15 12:00:18 -04:00
2015-09-22 20:09:38 +02:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-18 15:56:45 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-19 09:10:38 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2012-06-08 09:18:47 +00:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-21 10:26:32 +01:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-06-21 22:13:28 +02:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2015-09-15 12:00:18 -04:00
2011-08-12 12:31:08 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2011-11-14 20:58:01 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-09-21 14:36:39 -04:00
2015-01-22 09:38:39 +00:00
2014-10-15 10:49:24 +02:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-02-09 13:01:28 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2011-11-14 20:45:57 +00:00
2014-10-15 10:49:08 +02:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-05-23 11:22:10 +02:00
2015-05-26 09:58:12 +02:00
2015-09-17 22:33:31 +01:00
2015-01-22 09:38:39 +00:00
2015-04-22 17:24:47 +01:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:39:01 +00:00
2015-01-22 09:38:39 +00:00
2015-06-16 13:14:09 +02:00
2015-07-09 13:29:59 +01:00
2015-01-22 09:38:39 +00:00
2013-06-30 23:15:53 +02:00
2015-01-22 09:38:39 +00:00
2012-04-27 20:20:15 +00:00
2015-01-22 09:38:39 +00:00
2011-11-14 20:47:22 +00:00
2015-07-14 01:18:57 +02:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2013-01-22 22:54:04 +01:00
2013-03-18 19:50:23 +01:00