| Summary: | kpdf can't open some pdf files | ||
|---|---|---|---|
| Product: | [Unmaintained] kpdf | Reporter: | Antonio E. <aironmail> |
| Component: | general | Assignee: | Albert Astals Cid <aacid> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Gentoo Packages | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | This is one of the pdf files. | ||
|
Description
Antonio E.
2005-08-07 17:52:08 UTC
Created attachment 12126 [details]
This is one of the pdf files.
This is one of the pdf files that kpdf can't open.
SVN commit 443936 by aacid:
Fix %%EOF checking
BUGS: 110353
M +9 -1 PDFDoc.cc
--- branches/KDE/3.4/kdegraphics/kpdf/xpdf/xpdf/PDFDoc.cc #443935:443936
@@ -127,7 +127,15 @@
eof[i] = ch;
}
eof[i] = '\0';
- if (strstr(eof, "%%EOF") == NULL)
+
+ bool found = false;
+ for (i = i - 5; i >= 0; i--) {
+ if (strncmp (&eof[i], "%%EOF", 5) == 0) {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
{
error(-1, "Document does not have ending %%EOF");
errCode = errDamaged;
|