Hi, 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, Denis.