[OpenJDK 2D-Dev]  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
Please review the following fix in JDK12:
Bug : https://bugs.openjdk.java.net/browse/JDK-8211795
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the 2d-dev