[OpenJDK 2D-Dev] [12] RFR JDK-8211795: ArrayIndexOutOfBoundsException in PNGImageReader after JDK-6788458

Jayathirth D V jayathirth.d.v at oracle.com
Tue Nov 13 11:04:05 UTC 2018


Hello All,

 

Please review the following fix in JDK12:

 

Bug : https://bugs.openjdk.java.net/browse/JDK-8211795 

 

Webrev: http://cr.openjdk.java.net/~jdv/8211795/webrev.00/ 

 

Issue : When we read PNG image having tRNS chunk and it needs bitDepth adjustment then we throw ArrayIndexOutOfBoundsException

 

Root cause : In JDK-6788458 we are adding extra alpha channel for destination whenever we have tRNS chunk. But the number of bands in bitDepth scale array was not changed when we have tRNS chunk. This is causing ArrayIndexOutOfBoundsException for scale array.

 

Solution : Whenever we have tRNS chunk use extra alpha band for bitDepth scale array. 

 

Thanks,

Jay

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20181113/17198d74/attachment-0001.html>


More information about the 2d-dev mailing list