mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Fix significant bracketing problem
This error prevents the read of non-interlaced PNG files with height 1. A simple bracket problem caused by hasty multiple edits. Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
parent
0cb0a45721
commit
5357dd77f0
@ -375,7 +375,7 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
|
|||||||
* typically be before the last row in the image.
|
* typically be before the last row in the image.
|
||||||
*/
|
*/
|
||||||
if (png_ptr->read_started &&
|
if (png_ptr->read_started &&
|
||||||
png_ptr->interlaced == PNG_INTERLACE_NONE ?
|
(png_ptr->interlaced == PNG_INTERLACE_NONE ?
|
||||||
png_ptr->row_number == png_ptr->height-1U : (
|
png_ptr->row_number == png_ptr->height-1U : (
|
||||||
# ifdef PNG_READ_INTERLACING_SUPPORTED
|
# ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||||
png_ptr->do_interlace ?
|
png_ptr->do_interlace ?
|
||||||
@ -385,7 +385,7 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
|
|||||||
PNG_LAST_PASS_ROW(png_ptr->row_number, png_ptr->pass,
|
PNG_LAST_PASS_ROW(png_ptr->row_number, png_ptr->pass,
|
||||||
png_ptr->height)
|
png_ptr->height)
|
||||||
)
|
)
|
||||||
)
|
))
|
||||||
{
|
{
|
||||||
png_app_error(png_ptr, "Too many calls to png_read_row");
|
png_app_error(png_ptr, "Too many calls to png_read_row");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user