[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] RFR: 8270893: IndexOutOfBoundsException while reading large TIFF file
From:       Sergey Bylokhov <serb () openjdk ! java ! net>
Date:       2021-07-24 3:20:04
Message-ID: HvHCK2qH-Vah2-TcTIGYOCxH1TwsSWsZds37WKA37m4=.b42d21e8-6fb9-4ff4-8e2f-f75e2eae4419 () github ! com
[Download RAW message or body]

On Tue, 20 Jul 2021 06:25:22 GMT, Jayathirth D V <jdv@openjdk.org> wrote:

> We are incorrectly passing source offset to ImageInputStream.readFully() which is \
> getting used on destination buffer. streamPos maintained in each implementation of \
> stream maintain's appropriate source offset while reading the data. Since we are \
> completely utilizing destination buffer any offset greater than 0 would cause \
> IOOBE. In our case we should use 0 as offset value. 
> Also to hit this code we need stream/file with at-least 1MB of IFD data, that's why \
> there is no regression test. This change can be verified using image attached in \
> JBS. All test run is green.

1024000 bytes does not look like a big problem especially if it is generated on the \
fly during the test execution? You can try to load the data for our PYCC color \
profile and set one of its tag data to a big chunk like icSigCopyrightTag, or you can \
try to just fill it by zeros at the end.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4836


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic