[OpenJDK 2D-Dev] [9] request for review: 6945174: IndexOutOfBoundsException calling ImageIO.read() on malformed PNG

Andrew Brygin andrew.brygin at oracle.com
Thu May 8 18:43:09 UTC 2014


could you please review a fix for CR 6945174?

Bug: https://bugs.openjdk.java.net/browse/JDK-6945174
Webrev: http://cr.openjdk.java.net/~bae/6945174/9/webrev.00/

PNG image reader validates the length of chunk's data
when reads image metadata. However, if metadata is ignored,
the length  is used to skip data in the stream without
any validation.

Suggested fix just introduces a validation of the chunk
data length for the case of ignored metadata in a similar
way as it is done for the case of metadata processing.

Supplied regression test demonstrates the problem.

Please take a look.


More information about the 2d-dev mailing list