You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/07/26 16:20:00 UTC
[jira] [Commented] (PDFBOX-4279) ArrayIndexOutOfBoundsException in
PDDeviceGray.toRGB
[ https://issues.apache.org/jira/browse/PDFBOX-4279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16558499#comment-16558499 ]
ASF subversion and git services commented on PDFBOX-4279:
---------------------------------------------------------
Commit 1836742 from tilman@apache.org in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1836742 ]
PDFBOX-4279: copyOf instead of clone in case array is too small, avoids ArrayIndexOutOfBoundsException later
> ArrayIndexOutOfBoundsException in PDDeviceGray.toRGB
> ----------------------------------------------------
>
> Key: PDFBOX-4279
> URL: https://issues.apache.org/jira/browse/PDFBOX-4279
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.11
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Priority: Major
> Fix For: 2.0.12, 3.0.0 PDFBox
>
> Attachments: pop-bugzilla62905.pdf
>
>
> {code}
> java.lang.ArrayIndexOutOfBoundsException: 0
> org.apache.pdfbox.pdmodel.graphics.color.PDDeviceGray.toRGB(PDDeviceGray.java:69)
> org.apache.pdfbox.rendering.PageDrawer.getPaint(PageDrawer.java:308)
> org.apache.pdfbox.rendering.PageDrawer.getStrokingPaint(PageDrawer.java:617)
> org.apache.pdfbox.rendering.PageDrawer.strokePath(PageDrawer.java:682)
> org.apache.pdfbox.contentstream.operator.graphics.StrokePath.process(StrokePath.java:36)
> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:506)
> org.apache.pdfbox.contentstream.PDFStreamEngine.processTilingPattern(PDFStreamEngine.java:403)
> org.apache.pdfbox.rendering.PageDrawer.drawTilingPattern(PageDrawer.java:283)
> {code}
> The cause is
> {code}
> /CS2 CS
> /P2 SCN
> {code}
> The first line sets a pattern with DeviceGray, the second line sets an "uncolored tiling pattern" but no color so an empty array is created. Solution: enlarge the returned array.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org