On Tue, 20 Jul 2021 06:25:22 GMT, Jayathirth D V <j...@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. This pull request has now been integrated. Changeset: efcdcc7f Author: Jayathirth D V <j...@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/efcdcc7fb792c77aef1da69b1fcc652b401115f7 Stats: 83 lines in 2 files changed: 76 ins; 0 del; 7 mod 8270893: IndexOutOfBoundsException while reading large TIFF file Reviewed-by: prr, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/4836