mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 154996 - PNGs with invalid IHDR can crash/hang browser. rs=tor
This commit is contained in:
parent
62df86dd33
commit
db6ae294df
@ -14,3 +14,6 @@ Bug 81794 - crash/leak fix for pngrutil.c
|
||||
Bug 135579 - small interlaced PNG images not decoded correctly.
|
||||
Affected files: pngpread.c
|
||||
|
||||
Bug 154996 - PNG files with invalid IHDR can crash/hand browser.
|
||||
Affected files: pngpread.c
|
||||
|
||||
|
@ -736,6 +736,13 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
|
||||
}
|
||||
if (!(png_ptr->zstream.avail_out))
|
||||
{
|
||||
if ((
|
||||
#if defined(PNG_READ_INTERLACING_SUPPORTED)
|
||||
png_ptr->interlaced && png_ptr->pass > 6) ||
|
||||
(!png_ptr->interlaced &&
|
||||
#endif
|
||||
png_ptr->row_number == png_ptr->num_rows-1))
|
||||
png_error(png_ptr, "Too much data in IDAT chunks");
|
||||
png_push_process_row(png_ptr);
|
||||
png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes;
|
||||
png_ptr->zstream.next_out = png_ptr->row_buf;
|
||||
|
Loading…
Reference in New Issue
Block a user