Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.25
-
None
Description
I get this with the attached file from the linked poppler issue
ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3 org.apache.pdfbox.pdmodel.graphics.color.PDSeparation.tintTransform(PDSeparation.java:222) org.apache.pdfbox.pdmodel.graphics.color.PDSeparation.toRGBImage(PDSeparation.java:169) org.apache.pdfbox.pdmodel.graphics.color.PDIndexed.initRgbColorTable(PDIndexed.java:152) org.apache.pdfbox.pdmodel.graphics.color.PDIndexed.<init>(PDIndexed.java:93) org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:188)
The cause is that the range array is too short (7 elements for CMYK).
I'll catch this in the constructor and return an IOException. If there's a complaint then we could change the tintTransform() method so that it takes the minimum of alt.length and result.length.