mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] 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:
@@ -228,7 +228,7 @@ png_crc_finish(png_structrp png_ptr, png_uint_32 skip)
|
||||
|
||||
else
|
||||
{
|
||||
png_chunk_benign_error(png_ptr, "CRC error");
|
||||
png_chunk_error(png_ptr, "CRC error");
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -322,6 +322,8 @@ png_read_buffer(png_structrp png_ptr, png_alloc_size_t new_size, int warn)
|
||||
{
|
||||
#ifdef PNG_ERROR_TEXT_SUPPORTED
|
||||
png_chunk_error(png_ptr, "insufficient memory to read chunk");
|
||||
#else
|
||||
png_err(png_ptr);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user