[ https://issues.apache.org/jira/browse/PDFBOX-4624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16904046#comment-16904046 ]
Tilman Hausherr edited comment on PDFBOX-4624 at 8/9/19 5:12 PM: ----------------------------------------------------------------- It turned out to be easier (copy and paste from the trunk) than originally thought. [~mkl] yeah, I'm never surprised 🤣 [~apr] Thanks for the report 👍 was (Author: tilman): It turned out to be easier (copy and paste from the trunk) than originally thought. [~mkl] yeah, I'm never surprised. [~apr] Thanks for the report. > COSParser: NullPointerException > ------------------------------- > > Key: PDFBOX-4624 > URL: https://issues.apache.org/jira/browse/PDFBOX-4624 > Project: PDFBox > Issue Type: Bug > Components: Parsing > Affects Versions: 2.0.16 > Environment: java version "12" 2019-03-19 > Java(TM) SE Runtime Environment (build 12+33) > Java HotSpot(TM) 64-Bit Server VM (build 12+33, mixed mode, sharing) > MacOS Mojave > Reporter: Alex Rebert > Assignee: Tilman Hausherr > Priority: Minor > Fix For: 2.0.17 > > Attachments: NullPtrException.pdf > > > Parsing an invalid PDF can lead to a NullPointerException in COSParser > *Steps to repro* > # Download malformed PDF (attached) > # {{Run: java -jar pdfbox-app-2.0.16.jar ExtractText NullPtrException.pdf}} > *Stacktrace* > {noformat} > Exception in thread "main" java.lang.NullPointerException > at java.base/java.util.TreeMap.getEntry(TreeMap.java:345) > at java.base/java.util.TreeMap.get(TreeMap.java:277) > at org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:727) > at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:187) > at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:226) > at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1070) > at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1008) > at org.apache.pdfbox.tools.ExtractText.startExtraction(ExtractText.java:216) > at org.apache.pdfbox.tools.ExtractText.main(ExtractText.java:96) > at org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:60){noformat} -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org