You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2021/12/24 11:16:00 UTC
[jira] [Created] (PDFBOX-5352) ArrayIndexOutOfBoundsException in PDSeparation.tintTransform()
Tilman Hausherr created PDFBOX-5352:
---------------------------------------
Summary: ArrayIndexOutOfBoundsException in PDSeparation.tintTransform()
Key: PDFBOX-5352
URL: https://issues.apache.org/jira/browse/PDFBOX-5352
Project: PDFBox
Issue Type: Bug
Components: Rendering
Affects Versions: 2.0.25
Reporter: Tilman Hausherr
Assignee: Tilman Hausherr
Fix For: 2.0.26, 3.0.0 PDFBox
I get this with the attached file from the linked poppler issue
{noformat}
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)
{noformat}
The cause is that the range array is too short (7 elements for CMYK).
I'll catch this in the constructor and return an exception. If there's a complaint then we could change the tintTransform() method so that it takes the minimum of alt.length and result.length.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org