[OpenJDK 2D-Dev] [12] 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


Hello All,

 

Gentle reminder for review.

 

Thanks,

Jay

 

From: Jayathirth D V 
Sent: Tuesday, October 16, 2018 6:37 PM
To: 2d-dev
Subject: [OpenJDK 2D-Dev] [12] RFR JDK-8212116: IIOException "tEXt chunk length is not proper" on opening png file

 

Hello All,

 

Please review the following fix in JDK12:

 

Bug : https://bugs.openjdk.java.net/browse/JDK-8212116

 

Webrev: http://cr.openjdk.java.net/~jdv/8212116/webrev.00/ 

 

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.

 

Thanks,

Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20181112/d7cdd26f/attachment.html>


More information about the 2d-dev mailing list