[OpenJDK 2D-Dev] RFR: 8145113: OutOfMemoryError when reading a 17KB corrupted TIFF image

Brian Burkhalter brian.burkhalter at oracle.com
Thu Dec 24 21:33:59 UTC 2015


Please review at your convenience.

Issue:	https://bugs.openjdk.java.net/browse/JDK-8145113
Patch:	http://cr.openjdk.java.net/~bpb/8145113/webrev.00/

Summary:

Add some checks performed when reading an image file directory (IFD):

1. Ensure that the count of values in a field does not overflow an int.
2. Ensure that the size of field data does not overflow an int.
3. Ensure that sufficient pointers to and byte counts of data segments are present.

For the last case, this means that either a JPEG interchange offset is available (a byte count is not strictly needed in this case), or both strip/tile offsets and strip/tile byte counts are available.

Thanks,

Brian


More information about the 2d-dev mailing list