You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2016/08/26 17:16:21 UTC

[jira] [Created] (PDFBOX-3475) IllegalArgumentException: 2058 > -49861164 in PDType1Font.java

Tilman Hausherr created PDFBOX-3475:
---------------------------------------

             Summary: IllegalArgumentException: 2058 > -49861164 in PDType1Font.java
                 Key: PDFBOX-3475
                 URL: https://issues.apache.org/jira/browse/PDFBOX-3475
             Project: PDFBox
          Issue Type: Bug
          Components: FontBox
    Affects Versions: 2.0.2, 2.0.3, 2.1.0
            Reporter: Tilman Hausherr
            Assignee: Tilman Hausherr
             Fix For: 2.0.3, 2.1.0


{code}
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)
{code}
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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org