[ 
https://issues.apache.org/jira/browse/PDFBOX-3475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15439425#comment-15439425
 ] 

ASF subversion and git services commented on PDFBOX-3475:
---------------------------------------------------------

Commit 1757896 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1757896 ]

PDFBOX-3475: repair /Length2

> 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
>
>         Attachments: PDFJS-3928-p4.pdf
>
>
> {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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to