[libpng15] Fixed new bug with CRC error after reading an over-length palette.

This commit is contained in:
Glenn Randers-Pehrson 2015-11-04 23:45:44 -06:00
parent 4b0a6350cd
commit 15117f202c

View File

@ -710,7 +710,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