mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Added png_ptr->process_mode = PNG_READ_IDAT_MODE in
png_push_read_chunk after recognizing the IDAT chunk, which avoids an infinite loop while reading a datastream whose first IDAT chunk is of zero-length.
This commit is contained in:
@@ -234,6 +234,7 @@ png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr)
|
||||
png_error(png_ptr, "Missing PLTE before IDAT");
|
||||
|
||||
png_ptr->mode |= PNG_HAVE_IDAT;
|
||||
png_ptr->process_mode = PNG_READ_IDAT_MODE;
|
||||
|
||||
if (!(png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
|
||||
if (png_ptr->push_length == 0)
|
||||
|
||||
Reference in New Issue
Block a user