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-4307) ClassCastException in PDDocumentCatalog.getDocumentOutline if 'outlines' is not a dictionary
Date Fri, 31 Aug 2018 14:56:00 GMT

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

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

Commit 1839762 from tboehme@apache.org in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1839762 ]

PDFBOX-4307: check object type before casting to COSDictionary in PDDocumentCatalog.getDocumentOutline

> ClassCastException in PDDocumentCatalog.getDocumentOutline if 'outlines' is not a dictionary
> --------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-4307
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4307
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.11, 3.0.0 PDFBox
>            Reporter: Timo Boehme
>            Assignee: Timo Boehme
>            Priority: Minor
>
> In PDDocumentOutline.getDocumentOutline() the 'outline' is read as dictionary object
and directly cast to COSDictionary. Normally this is ok as it should be a dictionary. However
in a bad PDF as I have it in my collection (unfortunately I'm not allowed to disclose it)
the object is an array (COSArray) which leads to the ClassCastException.
> Since the outline is an optional information the best we can do here is to ignore the
'outline' data if its not a COSDIctionary and return 'null'.



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