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/01/10 18:27:58 UTC

[jira] [Assigned] (PDFBOX-3648) EOFException parsing PDFs with invalid xref offsets

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

Andreas Lehmkühler reassigned PDFBOX-3648:
------------------------------------------

    Assignee: Andreas Lehmkühler

> EOFException parsing PDFs with invalid xref offsets
> ---------------------------------------------------
>
>                 Key: PDFBOX-3648
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3648
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.4
>            Reporter: Jesse Long
>            Assignee: Andreas Lehmkühler
>            Priority: Minor
>         Attachments: PDFBOX-3648.patch
>
>
> ScratchFileBuffer does not allow seeking past the end of file. If the xref table claims an object offset past the end of file an IOException is incorrectly thrown.
> COSParser.checkObjectKeys() seeks to the offset claimed in the xref table and looks for a valid object number and generation number there.
> If there is an IOException while trying to READ in COSParser.checkObjectKeys(), the exception is caught and the parser falls back to brute force searching for objects offsets.
> The problem is that IOExceptions are not caught when attempting to SEEK to the offset claimed in the xref table. Solution: move the seek operation inside the try {} block.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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