[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kpdf/annotations/kdegraphics/kpdf/xpdf/xpdf
From: Enrico Ros <rosenric () dei ! unipd ! it>
Date: 2005-07-16 16:28:48
Message-ID: 1121531328.474675.21224.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 435343 by eros:
Merging patch_124,125 from head. (patches on my site)
M +21 -1 PDFDoc.cc
--- branches/kpdf/annotations/kdegraphics/kpdf/xpdf/xpdf/PDFDoc.cc #435342:435343
@@ -114,7 +114,27 @@
GBool PDFDoc::setup(GString *ownerPassword, GString *userPassword) {
str->reset();
-
+
+ char eof[8];
+ int pos = str->getPos();
+ str->setPos(7, -1);
+ eof[0] = str->getChar();
+ eof[1] = str->getChar();
+ eof[2] = str->getChar();
+ eof[3] = str->getChar();
+ eof[4] = str->getChar();
+ eof[5] = str->getChar();
+ eof[6] = str->getChar();
+ eof[7] = '\0';
+ if (strstr(eof, "%%EOF") == NULL)
+ {
+ error(-1, "Document does not have ending %%EOF");
+ errCode = errDamaged;
+ return gFalse;
+ }
+
+ str->setPos(pos);
+
// check header
checkHeader();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic