Bug 135579 - small interlaced PNGs not decoded correctly.

Patch from randeg@alum.rpi.edu, rs=tor.
This commit is contained in:
tor%cs.brown.edu 2002-06-17 21:32:03 +00:00
parent 58c348747f
commit 71c21a4e59
2 changed files with 18 additions and 1 deletions

View File

@ -2,7 +2,8 @@
Changes made to pristine png source by mozilla.org developers.
2002/02/15 -- Synced with 1.0.9 tree
Reapplied following changes:
Following changes applied:
Bug 78649 - Wrapped stderr fprintfs inside DEBUG ifdef.
Affected files: pnggccrd.c, ipng.cpp, if.cpp
@ -10,3 +11,6 @@ Bug 78649 - Wrapped stderr fprintfs inside DEBUG ifdef.
Bug 81794 - crash/leak fix for pngrutil.c
Affected files: pngrutil.c
Bug 135579 - small interlaced PNG images not decoded correctly.
Affected files: pngpread.c

View File

@ -796,6 +796,19 @@ png_push_process_row(png_structp png_ptr)
png_read_push_finish_row(png_ptr);
}
}
if (png_ptr->pass == 4 && png_ptr->height <= 4)
{
for (i = 0; i < 2 && png_ptr->pass == 4; i++)
{
png_push_have_row(png_ptr, NULL);
png_read_push_finish_row(png_ptr);
}
}
if (png_ptr->pass == 6 && png_ptr->height <= 4)
{
png_push_have_row(png_ptr, NULL);
png_read_push_finish_row(png_ptr);
}
break;
}
case 1: