[ https://issues.apache.org/jira/browse/PDFBOX-4452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tilman Hausherr updated PDFBOX-4452: ------------------------------------ Component/s: Parsing > ClassCastException in PDPageTree > -------------------------------- > > Key: PDFBOX-4452 > URL: https://issues.apache.org/jira/browse/PDFBOX-4452 > Project: PDFBox > Issue Type: Bug > Components: Parsing > Affects Versions: 2.0.13 > Reporter: Robin Schimpf > Assignee: Tilman Hausherr > Priority: Minor > Fix For: 2.0.14, 3.0.0 PDFBox > > Attachments: ClassCastException COSInteger instead of COSDictionary, > ClassCastException COSString instead of COSDictionary > > > Fuzzing PDF merging with JQF triggered an ClassCastException. The attached > file is merged with itself. > {code:java} > java.lang.ClassCastException: org.apache.pdfbox.cos.COSInteger cannot be cast > to org.apache.pdfbox.cos.COSDictionary > at org.apache.pdfbox.pdmodel.PDPageTree.getKids(PDPageTree.java:144) > at org.apache.pdfbox.pdmodel.PDPageTree.access$200(PDPageTree.java:38) > at > org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:166) > at > org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.<init>(PDPageTree.java:159) > at > org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.<init>(PDPageTree.java:153) > at org.apache.pdfbox.pdmodel.PDPageTree.iterator(PDPageTree.java:123) > at > org.apache.pdfbox.multipdf.PDFMergerUtility.appendDocument(PDFMergerUtility.java:737) > at > org.apache.pdfbox.multipdf.PDFMergerUtility.legacyMergeDocuments(PDFMergerUtility.java:390) > at > org.apache.pdfbox.multipdf.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:276) > ... > {code} > The Code used for fuzzing is > {code:java} > try (OutputStream out = new ByteArrayOutputStream()) { > PDFMergerUtility pdfMergerUtility = new PDFMergerUtility(); > pdfMergerUtility.addSource(file); > pdfMergerUtility.addSource(file); > pdfMergerUtility.setDestinationStream(out); > pdfMergerUtility.mergeDocuments(MemoryUsageSetting.setupMainMemoryOnly()); > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org