[libpng16] zero out memory allocated by png_inflate

This commit is contained in:
Glenn Randers-Pehrson 2017-09-18 14:23:41 -05:00
parent 562a68513e
commit 721b96ef90

View File

@ -670,6 +670,10 @@ png_decompress_chunk(png_structrp png_ptr,
(terminate != 0); (terminate != 0);
png_bytep text = png_voidcast(png_bytep, png_malloc_base(png_ptr, png_bytep text = png_voidcast(png_bytep, png_malloc_base(png_ptr,
buffer_size)); buffer_size));
/* attempt to stop an oss-fuzz "use of uninitialized value"
* in png_set_text_2()
*/
memset(text, 0, buffer_size);
if (text != NULL) if (text != NULL)
{ {