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

IllegalArgumentException: 2058 > -49861164 in PDType1Font.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.2, 2.0.3, 3.0.0 PDFBox
    • 2.0.3, 3.0.0 PDFBox
    • FontBox
    • None

    Description

      java.lang.IllegalArgumentException: 2058 > -49861164
          java.util.Arrays.copyOfRange(Unknown Source)
          org.apache.pdfbox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:223)
          org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:62)
      

      This is because the /Fontfile /Length2 values are bogus. A negative /Length2 brings an IllegalArgumentException in Arrays.copyOfRange(), a huge value eats up memory because of padding. So I'm doing a repair for the /Length2 as well.

      Attachments

        1. PDFJS-3928-p4.pdf
          187 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: