Hi, Jay.

Can you please provide some more detail about this bug.

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.

As far as I understand the AIOOB is occurred when we access ps[b] at line 1308 not when 
we access the scale array, because the scale array is created as "scale = new 
int[numBands][]".  So maybe numBands should depends on the passRow? or the creation 
of scale[][xxx] should be updated?
BTW this code uses +1/-1 in a lot of places already, and it is not always clear 
why.


--
Best regards, Sergey.

Reply via email to