pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-4333) ClassCastException when loading PDF
Date Mon, 08 Oct 2018 18:41:00 GMT

    [ https://issues.apache.org/jira/browse/PDFBOX-4333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16642293#comment-16642293
] 

ASF subversion and git services commented on PDFBOX-4333:
---------------------------------------------------------

Commit 1843181 from tilman@apache.org in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1843181 ]

PDFBOX-4333: avoid ClassCastException

> ClassCastException when loading PDF
> -----------------------------------
>
>                 Key: PDFBOX-4333
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4333
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.12
>            Reporter: Robin Schimpf
>            Priority: Minor
>         Attachments: ClassCastException COSArray instead of COSObject, ClassCastException
COSBoolean instead of COSObject, ClassCastException COSFloat instead of COSObject, ClassCastException
COSInteger instead of COSObject, ClassCastException COSName instead of COSObject, ClassCastException
COSNull instead of COSObject, ClassCastException COSString instead of COSObject
>
>
> Fuzzing PDF loading with [JQF|https://github.com/rohanpadhye/jqf] triggered a ClassCastException.
All attached files trigger the exception for a different class but are basically the same.
> {code:java}
> org.apache.pdfbox.cos.COSArray cannot be cast to org.apache.pdfbox.cos.COSObject
> java.lang.ClassCastException: org.apache.pdfbox.cos.COSArray cannot be cast to org.apache.pdfbox.cos.COSObject
>     at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2337)
>     at org.apache.pdfbox.pdfparser.COSParser.checkPages(COSParser.java:2321)
>     at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:193)
>     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}
> Throwing an Exception is ok since no other PDF reader I tried is able to load the files.
But it should not be an ClassCastException.



--
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