[
https://issues.apache.org/jira/browse/PDFBOX-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17317695#comment-17317695
]
Tilman Hausherr edited comment on PDFBOX-5158 at 4/9/21, 6:22 AM:
------------------------------------------------------------------
[~jpyeron] snapshot will soon be here:
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/3.0.0-SNAPSHOT/
However this bug is only related to files that have a length that is a multiple
of 4096, and only if these files are read as a FileInputStream, which is not as
efficient as reading from a file.
was (Author: tilman):
[~jpyeron] snapshot is here:
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/3.0.0-SNAPSHOT/
However this bug is only related to files that have a length that is a multiple
of 4096, and only if these files are read as a FileInputStream, which is not as
efficient as reading from a file.
> 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]