--- old/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java 2017-11-10 13:51:23.524053000 +0530 +++ new/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java 2017-11-10 13:51:23.040053000 +0530 @@ -269,11 +269,11 @@ stream.flushBefore(stream.getStreamPosition()); - if (width == 0) { - throw new IIOException("Image width == 0!"); + if (width <= 0) { + throw new IIOException("Image width <= 0!"); } - if (height == 0) { - throw new IIOException("Image height == 0!"); + if (height <= 0) { + throw new IIOException("Image height <= 0!"); } if (bitDepth != 1 && bitDepth != 2 && bitDepth != 4 && bitDepth != 8 && bitDepth != 16) {