mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Fixed new bug with CRC error after reading an over-length palette.
This commit is contained in:
parent
ea41fd2161
commit
e916d9bb60
@ -910,7 +910,7 @@ png_handle_PLTE(png_structrp png_ptr, png_inforp info_ptr)
|
|||||||
#ifndef PNG_READ_OPT_PLTE_SUPPORTED
|
#ifndef PNG_READ_OPT_PLTE_SUPPORTED
|
||||||
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
#endif
|
#endif
|
||||||
png_crc_finish(png_ptr, 0);
|
png_crc_finish(png_ptr, (int) length - num * 3);
|
||||||
|
|
||||||
#ifndef PNG_READ_OPT_PLTE_SUPPORTED
|
#ifndef PNG_READ_OPT_PLTE_SUPPORTED
|
||||||
else if (png_crc_error(png_ptr)) /* Only if we have a CRC error */
|
else if (png_crc_error(png_ptr)) /* Only if we have a CRC error */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user