diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2015-11-04 23:44:13 -0600 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2015-11-04 23:44:13 -0600 |
commit | 56def65afe302e76ff330a306ec45ab791872c7b (patch) | |
tree | 9429eac40c34c7c7a04d39c6271a57538a1ce7b3 /pngrutil.c | |
parent | f1fb90f1aab2fd0fcf95088fe8455a2dd3f8b2d9 (diff) | |
download | libpng-56def65afe302e76ff330a306ec45ab791872c7b.tar.gz |
[libpng14] Fixed new bug with CRC error after reading an over-length palette.
Diffstat (limited to 'pngrutil.c')
-rw-r--r-- | pngrutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pngrutil.c b/pngrutil.c index 40abb3331..6b53548fb 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.4.17 [November 3, 2015] + * Last changed in libpng 1.4.17 [November 5, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -648,7 +648,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) 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 else if (png_crc_error(png_ptr)) /* Only if we have a CRC error */ |