[Poppler-bugs] [Bug 64967] New: pdfinfo hangs when a corrupt file is piped in via stdin
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri May 24 14:41:52 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=64967
Priority: medium
Bug ID: 64967
Assignee: poppler-bugs at lists.freedesktop.org
Summary: pdfinfo hangs when a corrupt file is piped in via
stdin
Severity: major
Classification: Unclassified
OS: Mac OS X (All)
Reporter: nathan at storydesk.com
Hardware: x86-64 (AMD64)
Status: NEW
Version: unspecified
Component: utils
Product: poppler
Created attachment 79774
--> https://bugs.freedesktop.org/attachment.cgi?id=79774&action=edit
A bad PDF file
When pdfinfo receives a corrupt file that is piped in via stdin it hangs with
100% CPU usage.
Example Usage:
cat damaged.pdf | pdfinfo -
Output:
Syntax Warning: May not be a PDF file (continuing anyway)
Expected outcome:
The program should terminate after determining that the file is corrupt
Actual outcome:
After outputting the one error message it never terminates and sits there using
100% of the CPU.
It is worth noting that when pdfinfo is invoked with the exact same file via:
pdfinfo damaged.pdf
instead of piping the corrupt PDF in via stdin then this problem does not
happen and the output is:
Syntax Warning: May not be a PDF file (continuing anyway)
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Couldn't read xref table
Then the process terminates as expected.
I have attached the bad file that I am using to test with and recreate this
issue.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20130524/4d5764b4/attachment.html>
More information about the Poppler-bugs
mailing list