Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3703

ArrayIndexOutOfBoundsException in PDDeviceRGB.toRGB()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.5, 3.0.0 PDFBox
    • Component/s: Rendering
    • Labels:
      None

      Description

      java.lang.ArrayIndexOutOfBoundsException: 1
      	at java.awt.color.ICC_ColorSpace.toRGB(ICC_ColorSpace.java:179)
      	at org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB.toRGB(PDDeviceRGB.java:104)
      	at org.apache.pdfbox.pdmodel.graphics.color.PDICCBased.toRGB(PDICCBased.java:195)
      	at org.apache.pdfbox.rendering.PageDrawer.getPaint(PageDrawer.java:286)
      	at org.apache.pdfbox.rendering.PageDrawer.getStrokingPaint(PageDrawer.java:620)
      	at org.apache.pdfbox.rendering.PageDrawer.strokePath(PageDrawer.java:689)
      	at org.apache.pdfbox.contentstream.operator.graphics.StrokePath.process(StrokePath.java:36)
      	at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
      	at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:509)
      	at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:477)
      	at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:158)
      	at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:223)
      	at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:147)
      	at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:69)
      	at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:56)
      	at pdfboxziptest.PDFBoxZipTest.doPdf(PDFBoxZipTest.java:203)
      	at pdfboxziptest.PDFBoxZipTest.main(PDFBoxZipTest.java:63)
      

      The cause is that the parameter check is done only for device colorspaces, but it should be done for all except patterns.

        Attachments

        1. 966635-p12.pdf
          92 kB
          Tilman Hausherr

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              tilman Tilman Hausherr
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: