Created attachment 79774 [details] 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.
Will be fixed in poppler 0.22.5. Thanks for the report
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.