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

ArrayIndexOutOfBoundsException in PDICCBased.loadICCProfile()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.3
    • 2.0.4, 3.0.0 PDFBox
    • PDModel
    • None

    Description

      Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
              at java.awt.color.ICC_ColorSpace.fromRGB(Unknown Source)
              at org.apache.pdfbox.pdmodel.graphics.color.PDICCBased.loadICCProfile(PDICCBased.java:145)
              at org.apache.pdfbox.pdmodel.graphics.color.PDICCBased.<init>(PDICCBased.java:89)
      

      The line that triggers this is this new line

      awtColorSpace.fromRGB(new float[3]);
      

      According to the javadoc ArrayIndexOutOfBoundsException happens only if the input array is smaller than 3.... I'll just add ArrayIndexOutOfBoundsException to the catch list. Probably yet another JDK bug.

      Attachments

        1. gs-bugzilla687042.pdf
          120 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: