You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2017/10/03 17:49:00 UTC

[jira] [Resolved] (PDFBOX-3948) NumberFormatException in bfSearchForObjStreams

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

Andreas Lehmkühler resolved PDFBOX-3948.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0
                   2.0.8

The compressed object streams contains some unexpected newlines. Furthermore the root object is an conpressed object and those were simpky skipped in {{rebuildTrailer}}, so that I had to improve the method to process such objects as well

Thanks again [~tallison@mitre.org] and [~tilman] for the finding

> NumberFormatException in bfSearchForObjStreams
> ----------------------------------------------
>
>                 Key: PDFBOX-3948
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3948
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.8
>            Reporter: Tilman Hausherr
>            Assignee: Andreas Lehmkühler
>              Labels: regression
>             Fix For: 2.0.8, 3.0.0
>
>         Attachments: EUWO6SQS5TM4VGOMRD3FLXZHU35V2CP2.pdf
>
>
> {code}
> java.lang.NumberFormatException: For input string: "245
> 89"
>     java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>     java.lang.Long.parseLong(Long.java:589)
>     java.lang.Long.parseLong(Long.java:631)
>     org.apache.pdfbox.pdfparser.COSParser.bfSearchForObjStreams(COSParser.java:1766)
>     org.apache.pdfbox.pdfparser.COSParser.bfSearchForObjects(COSParser.java:1529)
>     org.apache.pdfbox.pdfparser.COSParser.getBFCOSObjectOffsets(COSParser.java:1445)
>     org.apache.pdfbox.pdfparser.COSParser.rebuildTrailer(COSParser.java:1905)
> {code}
> This worked in 2.0.7. The exception happens with only 2 files from the tests by Tim.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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