summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2011-10-27 19:43:18 +0200
committerAlbert Astals Cid <aacid@kde.org>2011-10-27 19:43:18 +0200
commit9e65ac814d9917a5689a4f24e4684f7fb6542c39 (patch)
treeafaf2809baaa6251305c02a432d45f47c47fee4a
parent1436356546e223150f7ff49837e935aaca1d7add (diff)
xpdf303: Adopt xpdf solution for the name too long problem
-rw-r--r--ALL_DIFF37
1 files changed, 0 insertions, 37 deletions
diff --git a/ALL_DIFF b/ALL_DIFF
index b9990ca..15ff52b 100644
--- a/ALL_DIFF
+++ b/ALL_DIFF
@@ -12577,43 +12577,6 @@ diff -ru xpdf-3.02/xpdf/Lexer.cc xpdf-3.03/xpdf/Lexer.cc
getChar();
continue;
}
-@@ -330,18 +333,30 @@
- } else if (c2 >= 'a' && c2 <= 'f') {
- c += c2 - 'a' + 10;
- } else {
- error(errSyntaxError, getPos(), "Illegal digit in hex char in name");
- }
- }
- notEscChar:
-- if (++n == tokBufSize) {
-- error(getPos(), "Name token too long");
-- break;
-+ // the PDF spec claims that names are limited to 127 chars, but
-+ // Distiller 8 will produce longer names, and Acrobat 8 will
-+ // accept longer names
-+ ++n;
-+ if (n < tokBufSize) {
-+ *p++ = c;
-+ } else if (n == tokBufSize) {
-+ *p = c;
-+ s = new GString(tokBuf, n);
-+ } else {
-+ s->append((char)c);
- }
-- *p++ = c;
- }
-- *p = '\0';
-- obj->initName(tokBuf);
-+ if (n < tokBufSize) {
-+ *p = '\0';
-+ obj->initName(tokBuf);
-+ } else {
-+ obj->initName(s->getCString());
-+ delete s;
-+ }
- break;
-
- // array punctuation
Només a xpdf-3.03/xpdf: OptionalContent.cc
Només a xpdf-3.03/xpdf: OptionalContent.h
diff -ru xpdf-3.02/xpdf/OutputDev.cc xpdf-3.03/xpdf/OutputDev.cc