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

Tilman Hausherr edited comment on PDFBOX-5158 at 4/9/21, 6:19 AM:
------------------------------------------------------------------

[~jpyeron] that sounds like a different thing, could you have a look into that 
file with an editor like NOTEPAD++ and look at the positions of %%EOF and the 
/Prev values and open a separate issue with that?


was (Author: tilman):
[~jpyeron] that sounds like a different thing, could have a look into that file 
and look at the positions of %%EOF and the /Prev values and open a separate 
issue with that?

> Infinite loop on corrupted PDF in 3.0.0-SNAPSHOT
> ------------------------------------------------
>
>                 Key: PDFBOX-5158
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5158
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 3.0.0 PDFBox
>            Reporter: Tim Allison
>            Priority: Critical
>             Fix For: 3.0.0 PDFBox
>
>
> I found a bunch of files that had a "read too many EOFs", which is a safety 
> check we now do in TikaInputStream to identify parsers that read an EOF > 
> 1000 times, which may be a sign of an infinite loop.
> When I turn off this safety check in TikaInputStream, I get an infinite loop.
> This is one of the triggering files: 
> https://corpora.tika.apache.org/base/docs/commoncrawl3/OE/OELHPKYAQPDNDWC535NE23Z6FKYRMN7W
> It's a truncated file from Common Crawl.
> The stacktrace when this is thrown is:
> {noformat}
> afterRead:809, TikaInputStream (org.apache.tika.io)
> read:82, ProxyInputStream (org.apache.commons.io.input)
> <init>:113, RandomAccessReadBuffer (org.apache.pdfbox.io)
> loadPDF:454, Loader (org.apache.pdfbox)
> loadPDF:430, Loader (org.apache.pdfbox)
> getPDDocument:189, PDFParser (org.apache.tika.parser.pdf)
> parse:148, PDFParser (org.apache.tika.parser.pdf)
> parse:288, CompositeParser (org.apache.tika.parser)
> parse:288, CompositeParser (org.apache.tika.parser)
> parse:150, AutoDetectParser (org.apache.tika.parser)
> parse:157, RecursiveParserWrapper (org.apache.tika.parser)
> getRecursiveMetadata:379, TikaTest (org.apache.tika)
> getRecursiveMetadata:369, TikaTest (org.apache.tika)
> getRecursiveMetadata:357, TikaTest (org.apache.tika)
> getRecursiveMetadata:351, TikaTest (org.apache.tika)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to