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

ArrayIndexOutOfBoundsException in PDSeparation.tintTransform()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.25
    • 2.0.26, 3.0.0 PDFBox
    • Rendering
    • 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.

      Attachments

        1. POPPLER-1184.pdf
          10 kB
          Tilman Hausherr

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: