[poppler] poppler/XRef.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Thu Apr 28 21:54:07 UTC 2016
poppler/XRef.cc | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
New commits:
commit 1cc93886eee3204e2ccd8bcc8b90306e809255e0
Author: Thomas Freitag <Thomas.Freitag at alfa.de>
Date: Thu Apr 28 23:53:06 2016 +0200
Allow newlines in '<num> <gen> obj' sequence
Bug #94756
diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index 76ffc6f..3d032bc 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -973,7 +973,12 @@ GBool XRef::constructXRef(GBool *wasReconstructed, GBool needCatalogDict) {
do {
++p;
} while (*p && isdigit(*p & 0xff));
- if (isspace(*p & 0xff)) {
+ if ((*p & 0xff) == 0 || isspace(*p & 0xff)) {
+ if ((*p & 0xff) == 0) {
+ //new line, continue with next line!
+ str->getLine(buf, 256);
+ p = buf - 1;
+ }
do {
++p;
} while (*p && isspace(*p & 0xff));
@@ -982,7 +987,12 @@ GBool XRef::constructXRef(GBool *wasReconstructed, GBool needCatalogDict) {
do {
++p;
} while (*p && isdigit(*p & 0xff));
- if (isspace(*p & 0xff)) {
+ if ((*p & 0xff) == 0 || isspace(*p & 0xff)) {
+ if ((*p & 0xff) == 0) {
+ //new line, continue with next line!
+ str->getLine(buf, 256);
+ p = buf - 1;
+ }
do {
++p;
} while (*p && isspace(*p & 0xff));
@@ -1251,6 +1261,7 @@ Object *XRef::fetch(int num, int gen, Object *obj, int recursion) {
err:
if (!xRefStream && !xrefReconstructed) {
+ error(errInternal, -1, "xref num {0:d} not found but needed, try to reconstruct\n", num);
rootNum = -1;
constructXRef(&xrefReconstructed);
return fetch(num, gen, obj, ++recursion);
More information about the poppler
mailing list