[OpenJDK 2D-Dev] RFR: 8270893: IndexOutOfBoundsException while reading large TIFF file [v2]
Jayathirth D V
jdv at openjdk.java.net
Tue Aug 3 09:11:07 UTC 2021
> 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.
Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision:
Added regression test
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/4836/files
- new: https://git.openjdk.java.net/jdk/pull/4836/files/81d54f09..9c7e113c
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4836&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4836&range=00-01
Stats: 76 lines in 1 file changed: 76 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/4836.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4836/head:pull/4836
PR: https://git.openjdk.java.net/jdk/pull/4836
More information about the 2d-dev
mailing list