pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Lehmkühler (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (PDFBOX-4354) NumberFormatException in COSParser
Date Mon, 22 Oct 2018 16:35:00 GMT

     [ https://issues.apache.org/jira/browse/PDFBOX-4354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Lehmkühler resolved PDFBOX-4354.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0 PDFBox
                   2.0.13

Done, the number format exceptions are gone.

Thanks!

> NumberFormatException in COSParser
> ----------------------------------
>
>                 Key: PDFBOX-4354
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4354
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.12
>            Reporter: Robin Schimpf
>            Assignee: Andreas Lehmkühler
>            Priority: Minor
>             Fix For: 2.0.13, 3.0.0 PDFBox
>
>         Attachments: NumberFormatException COSParser#bfSearchForObjStreams, NumberFormatException
COSParser#parseXrefTable
>
>
> Fuzzing PDF loading with [JQF|https://github.com/rohanpadhye/jqf] triggered two NumberFormatExceptions
in different places.
> First exception:
> {code:java}
> java.lang.NumberFormatException: For input string: "1f"
> 	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> 	at java.lang.Long.parseLong(Long.java:589)
> 	at java.lang.Long.parseLong(Long.java:631)
> 	at org.apache.pdfbox.pdfparser.COSParser.bfSearchForObjStreams(COSParser.java:2052)
> 	at org.apache.pdfbox.pdfparser.COSParser.retrieveTrailer(COSParser.java:287)
> 	at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:171)
> 	at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:220)
> 	at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1160)
> 	at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1057)
>     ...
> {code}
> Second exception:
> {code:java}
> java.lang.NumberFormatException: For input string: "am"
> 	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> 	at java.lang.Integer.parseInt(Integer.java:580)
> 	at java.lang.Integer.parseInt(Integer.java:615)
> 	at org.apache.pdfbox.pdfparser.COSParser.parseXrefTable(COSParser.java:2696)
> 	at org.apache.pdfbox.pdfparser.COSParser.parseXref(COSParser.java:326)
> 	at org.apache.pdfbox.pdfparser.COSParser.retrieveTrailer(COSParser.java:254)
> 	at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:171)
> 	at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:220)
> 	at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1160)
> 	at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1057)
>     ...
> {code}
> The Code used for fuzzing is
> {code:java}
> PDDocument.load(inputStream)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message