diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2017-10-20 19:38:03 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2017-10-20 19:38:03 -0500 |
commit | aea0ec4346341aaa75d84694ff32851936d3239d (patch) | |
tree | dc75d44c0b61393fe70312cfc9b40d442e17cc12 | |
parent | af08094ba669eb22401fe1bd771d12a866a6b24e (diff) | |
download | libpng-aea0ec4346341aaa75d84694ff32851936d3239d.tar.gz |
[libpng16] Initialize tRNS read buffers in pngrutil.c
-rw-r--r-- | pngrutil.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pngrutil.c b/pngrutil.c index 966a4ffb3..f5a23e6ec 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1817,7 +1817,7 @@ png_handle_sPLT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) void /* PRIVATE */ png_handle_tRNS(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) { - png_byte readbuf[PNG_MAX_PALETTE_LENGTH]; + png_byte readbuf[PNG_MAX_PALETTE_LENGTH]={0}; png_debug(1, "in png_handle_tRNS"); @@ -1840,7 +1840,7 @@ png_handle_tRNS(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) { - png_byte buf[2]; + png_byte buf[2]={0}; if (length != 2) { @@ -1856,7 +1856,7 @@ png_handle_tRNS(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) { - png_byte buf[6]; + png_byte buf[6]={0}; if (length != 6) { |