Hi,

 

Thanks for your input Phil.

I have made changes just to parse "FF FF"(Like "FF 00" or any marker without 
length)and not consider it as an invalid marker in skipImage() of 
JPEGImageReader.java.

Also I have removed closed/javax/imageio/ReadAllThumbnailsTest.java from 
ProblemList.txt as part of fix.

 

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

 

Please find webrev for review for JDK9:

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

 

Thanks,

Jay

 

From: Phil Race 
Sent: Saturday, July 09, 2016 12:37 AM
To: Jayathirth D V
Cc: Jim Graham; 2d-dev
Subject: Re: REG : JDK-8160943 : [PIT] new failure of 
closed/javax/imageio/ReadAllThumbnailsTest.java

 

On 07/08/2016 04:08 AM, Jayathirth D V wrote:

Hi,

 

In HYPERLINK "https://bugs.openjdk.java.net/browse/JDK-8152672"JDK-8152672 we 
modified skipImage() in JpegImageReader.java and added tighter checks for 
parsing Jpeg data.

 

We have to find any marker,0 or EOF after we find "FF" while parsing JPEG data.

But in HYPERLINK "https://bugs.openjdk.java.net/browse/JDK-8160943"JDK-8160943 
we have gap between APP0 marker and DQT(FF DB) marker which contains data "00 
FF".

 

APP0_End -> 00 FF -> FF DB(DQT)

 

So after we skip APP0 marker we find two bytes of data which is "FF FF". In the 
present code we consider this as invalid marker.


See https://www.w3.org/Graphics/JPEG/itu-t81.pdf

B.1.1.2 Markers
Markers serve to identify the various structural parts of the compressed data 
formats.
Most markers start marker segments containing a related group of parameters;
some markers stand alone. All markers are assigned two-byte codes: an
X'FF' byte followed by a byte which is not equal to 0 or X'FF' (see Table B.1).
Any marker may optionally be preceded by any number of fill bytes,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
which are bytes assigned code X'FF
^^^^^^^^^^^^^^^^^^^^^^

-phil.




Because of this HYPERLINK 
"https://bugs.openjdk.java.net/browse/JDK-8160943"JDK-8160943 is failing.

 

Is the length of APP0 marker not valid in the image or we should not consider 
"FF FF" as invalid maker?

Please let me know your input.

 

Thanks,

Jay

 

Reply via email to