Rethinking this slightly, I think it might be good to changes lines 218 and 236 of TIFFImageReader from
imageIndex = index - 1; to imageIndex = index > 0 ? index - 1 : 0; If that looks reasonable I will update the webrev in place and push the fix. Thanks, Brian On Aug 10, 2016, at 10:28 PM, Philip Race <philip.r...@oracle.com> wrote: > +1 > > -phil. > > On 8/10/16, 7:36 PM, Brian Burkhalter wrote: >> Please review at your convenience. >> >> Issue: https://bugs.openjdk.java.net/browse/JDK-8145014 >> Patch: http://cr.openjdk.java.net/~bpb/8145014/webrev.00/ >> >> In the locateImage() method handle zero-entry IFDs and EOFExceptions, >> hopefully returning the correct viable number of leading images in the >> stream with any bogus ones at the end being ignored. >> >> Thanks, >> >> Brian