[Poppler-bugs] [Bug 105674] New: Spurious warning in PDFDoc::checkHeader() with tiny PDF files
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Mar 22 02:55:52 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=105674
Bug ID: 105674
Summary: Spurious warning in PDFDoc::checkHeader() with tiny
PDF files
Product: poppler
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: general
Assignee: poppler-bugs at lists.freedesktop.org
Reporter: evangelos at foutrelis.com
The fix for bug 104502 causes small PDF files (under 1024 bytes) to print a
warning. This in turn triggers test suite failures in pdf2djvu because it uses
really tiny PDFs in three of its tests.
My proposed patch makes use of an idiom also found elsewhere in PDFDoc.cc; it
reads up to headerSearchSize bytes and stops if it encounters EOF,
null-terminates the string in the buffer at the current position and continues
to process the data it has read up to that point.
With this patch on top of Poppler 0.63.0, the test suite of pdf2djvu 0.9.8
passes successfully. Hope the patch is correct; I don't trust me not to
introduce off-by-one errors. FWIW, the tests pass and Evince displays the
correct PDF version.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20180322/5a32da06/attachment.html>
More information about the Poppler-bugs
mailing list