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

ArrayIndexOutOfBoundsException in PDICCBased.loadICCProfile()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.4, 3.0.0 PDFBox
    • Component/s: PDModel
    • Labels:
      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

          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: