RFR: 8169715: jimage fails with IAE when attempts to inspect an empty file
denis.kononenko at oracle.com
Mon Feb 13 17:58:12 UTC 2017
Optimized buffer's capacity checks.
> Could please someone review the fix for JDK-8169715.
> The problem occurs when jimage tool is attempting to read an empty or
> incomplete image. The current implementation works with ByteBuffer and
> always relies on that there's enough data to inspect the image. This
> results in IAE inside of BasicImageReader.slice method when the buffer
> is smaller then it's expected.
> I added a few checks to avoid IAE and throw IOException with a more
> descriptive text.
> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8169715
> WEBREV: http://cr.openjdk.java.net/~dkononenko/8169715/webrev.01
> Thank you,
More information about the jigsaw-dev