Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.2, 2.0.3, 3.0.0 PDFBox
-
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.