Open Bug 1452735 Opened 2 years ago Updated Last year

Unable to decode particular PNG file


(Core :: ImageLib, defect, P3)





(Reporter: scroggo, Unassigned)



(Keywords: parity-edge, parity-ie, regression, Whiteboard: [gfx-noted])


(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Steps to reproduce:

Try to open the attached file in FireFox

Actual results:

"The image "..." cannot be displayed because it contains errors."

Expected results:

Display the image. This seems to be a recent failure. FireFox 52.6.0 (64-bit) displayed the image, but when I tried on trunk (specifically 61.0a1) it failed.

I'm guessing this is due to a libpng update. It seems the image has a large iTXt chunk with XMP data - larger than the PNG_USER_CHUNK_MALLOC_MAX of 4000000L. This used to be okay, but in 1.6.32, libpng was updated [1] to check all chunks (except IDAT) against PNG_USER_CHUNK_MALLOC_MAX.

Maybe this is working as intended? FireFox set a maximum size for a chunk, and this chunk is bigger than that. It does seem like maybe it's too bad, since an image that used to work no longer does. Also, FireFox was going to ignore the chunk anyway, so maybe it was an unnecessary check? (Same bug occurs in Chromium:

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
Blocks: 1402057
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Untriaged → ImageLib
Ever confirmed: true
Flags: needinfo?(jmuizelaar)
Keywords: regression
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All
Whiteboard: [parity-ie][parity-edge]
Flags: needinfo?(jmuizelaar) → needinfo?(glennrp+bmo)
Priority: -- → P3
Whiteboard: [parity-ie][parity-edge] → [parity-ie][parity-edge][gfx-noted]
Not a compete solution but try changing png_error() to png_chunk_benign_error() in pngrutil.c around line 3186
Flags: needinfo?(glennrp+bmo)
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Whiteboard: [parity-ie][parity-edge][gfx-noted] → [gfx-noted]
You need to log in before you can comment on or make changes to this bug.