commit | 9f2ad4928e47036cf1ac9b8fe45a491f15be2324 | [log] [tgz] |
---|---|---|
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | Wed Nov 04 23:47:42 2015 -0600 |
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | Wed Nov 04 23:47:42 2015 -0600 |
tree | 1db3bbcbc7b1bd366a958d60f8dd709521fbe4ad | |
parent | 0e300440948c9f9748b42b680743a987bcdcd97e [diff] |
[libpng16] Fixed new bug with CRC error after reading an over-length palette.
diff --git a/pngrutil.c b/pngrutil.c index 6d35445..a006199 100644 --- a/pngrutil.c +++ b/pngrutil.c
@@ -975,7 +975,7 @@ if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) #endif { - png_crc_finish(png_ptr, 0); + png_crc_finish(png_ptr, (int) length - num * 3); } #ifndef PNG_READ_OPT_PLTE_SUPPORTED