[libpng16] Relocate new memset() call in pngrutil.c (irwir).

This commit is contained in:
Glenn Randers-Pehrson
2017-09-22 15:21:36 -05:00
parent 60d297d592
commit 0165badb9d
3 changed files with 6 additions and 3 deletions

View File

@@ -671,10 +671,11 @@ png_decompress_chunk(png_structrp png_ptr,
(terminate != 0);
png_bytep text = png_voidcast(png_bytep, png_malloc_base(png_ptr,
buffer_size));
memset(text, 0, buffer_size);
if (text != NULL)
{
memset(text, 0, buffer_size);
ret = png_inflate(png_ptr, png_ptr->chunk_name, 1/*finish*/,
png_ptr->read_buffer + prefix_size, &lzsize,
text + prefix_size, newlength);