summaryrefslogtreecommitdiff
path: root/pngrutil.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-09-22 15:21:36 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-09-22 15:21:36 -0500
commit0165badb9d28491ddba098168162e4c25e2f4dcc (patch)
tree0e7bc125bbe8fce29d772f74892e203466b199f3 /pngrutil.c
parent60d297d59210d12c1611ecd76746aa8632bfb961 (diff)
downloadlibpng-0165badb9d28491ddba098168162e4c25e2f4dcc.tar.gz
[libpng16] Relocate new memset() call in pngrutil.c (irwir).
Diffstat (limited to 'pngrutil.c')
-rw-r--r--pngrutil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pngrutil.c b/pngrutil.c
index eb6dc6abc..fb6d6b7a2 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -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);