[OpenJDK 2D-Dev]  RFR JDK-8212116: IIOException "tEXt chunk length is not proper" on opening png file
Jayathirth D V
jayathirth.d.v at oracle.com
Tue Nov 13 04:22:52 UTC 2018
Gentle reminder for review.
From: Jayathirth D V
Sent: Tuesday, October 16, 2018 6:37 PM
Subject: [OpenJDK 2D-Dev]  RFR JDK-8212116: IIOException "tEXt chunk length is not proper" on opening png file
Please review the following fix in JDK12:
Bug : https://bugs.openjdk.java.net/browse/JDK-8212116
Issue : When we try to read PNG image with no text in tEXt chunk we throw IIOException.
Root cause : While fixing HYPERLINK "https://bugs.openjdk.java.net/browse/JDK-8191023"JDK-8191023 we added tighter condition for chunk length in text chunks and we throw IIOException even when text length is 0. But text chunks can contain null text with just keyword and other data according to PNG spec.
Solution : Allow text chunks with text length 0 in tEXt chunk. As part of this fix I have made changes to zTXt and iTXt chunk also as we will have same problem there also. In HYPERLINK "https://bugs.openjdk.java.net/browse/JDK-8191023"JDK-8191023 we added tighter checks for iCCP and sPLT chunk also, but in these chunks we should not allow them to have null compressed profile or null palette. So no changes are made in iCCP & sPLT parse functions.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the 2d-dev