You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Maruan Sahyoun (JIRA)" <ji...@apache.org> on 2013/12/06 22:05:35 UTC
[jira] [Resolved] (PDFBOX-1796) Infiniteloop BaseParser.java:1010
[ https://issues.apache.org/jira/browse/PDFBOX-1796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maruan Sahyoun resolved PDFBOX-1796.
------------------------------------
Resolution: Fixed
fixed in revision 1548394
> Infiniteloop BaseParser.java:1010
> ---------------------------------
>
> Key: PDFBOX-1796
> URL: https://issues.apache.org/jira/browse/PDFBOX-1796
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 1.8.3
> Reporter: Manfred Schauer
> Fix For: 2.0.0
>
> Attachments: dls.pdf, rsag.pdf
>
>
> infinite loop at org.apache.pdfbox.pdfparser.BaseParser.parseCOSHexString(BaseParser.java:1010)
> private final COSString parseCOSHexString() throws IOException
> {
> ...
> // read till the closing bracket was found
> do
> {
> c = pdfSource.read();
> } while ( c != '>' );
> ...
> if pdfSource.read() returns EOF, the loop never terminates;
> Testcase:
> PDDocument doc = PDDocument.load (new FileInputStream("..."));
> 2 real world pdf-files that cause the loop could be attached; do not know if their PDF is completely valid, but at least they are displayed via Preview in MacOSX.
--
This message was sent by Atlassian JIRA
(v6.1#6144)