[OpenJDK 2D-Dev] [9] RFR: JDK-8160943 : skipImage() in JPEGImageReader class throws IIOException if we have gaps between markers in Jpeg image
Jayathirth D V
jayathirth.d.v at oracle.com
Mon Aug 1 15:49:37 UTC 2016
Hi Phil,
Thanks for your review.
I have run all jtreg tests under imageio and there are no side effects.
Thanks,
Jay
From: Philip Race
Sent: Monday, August 01, 2016 7:22 PM
To: Jayathirth D V
Cc: Jim Graham; Prasanta Sadhukhan; 2d-dev at openjdk.java.net
Subject: Re: [OpenJDK 2D-Dev] [9] RFR: JDK-8160943 : skipImage() in JPEGImageReader class throws IIOException if we have gaps between markers in Jpeg image
+1 - assuming you have run the jtreg tests for imageio ..
-phil.
On 8/1/16, 1:26 AM, Jayathirth D V wrote:
Hi,
Please review the following fix in JDK9 at your convenience:
Bug : https://bugs.openjdk.java.net/browse/JDK-8160943
Webrev : HYPERLINK "http://cr.openjdk.java.net/%7Ejdv/8160943/webrev.00/"http://cr.openjdk.java.net/~jdv/8160943/webrev.00/
Root cause : While fixing JDK-8152672 we considered that there can be no data in Jpeg image which can be like "FF FF" and we threw IIOException if we find data as "FF FF" and considered it as invalid marker.
Solution : According to https://www.w3.org/Graphics/JPEG/itu-t81.pdf there can be gaps between markers in Jpeg image and it can contain fill bits like "X FF".
In this case if a fill bit is followed by any valid maker in Jpeg it will contain sequence of data which will be "FF FF". So we should not consider "FF FF" as invalid marker and just parse through it. Added check to consider "FF FF" as normal data in Jpeg.
Thanks,
Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160801/d0741810/attachment.html>
More information about the 2d-dev
mailing list