poppler/Lexer.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8a5e59c6ea7ccd0ecbdb4b37bf3fe4e74e1c0e8e
Merge: 1b70533 310fbee
Author: Albert Astals Cid <[email protected]>
Date: Wed Jun 18 00:37:03 2014 +0200
Merge remote-tracking branch 'origin/poppler-0.26'
commit 310fbeec692b02d555e3e8dd6c851be11b25e26a
Author: Albert Astals Cid <[email protected]>
Date: Wed Jun 18 00:31:48 2014 +0200
Make sure we have an xref before using
KDE bug #335413 had this backtrace
XRef::getNumEntry (this=0x0, offset=-1) at XRef.cc:1300
0x00007f29aec1681e in Lexer::getObj (this=0x1648760,
obj=obj@entry=0x1bdf978, cmdA=cmdA@entry=0x7f29aeca66c8 "endstream",
objNum=objNum@entry=0) at Lexer.cc:594
0x00007f29aec20dfd in Parser::shift (this=this@entry=0x1bdf950,
cmdA=cmdA@entry=0x7f29aeca66c8 "endstream", objNum=objNum@entry=0) at
Parser.cc:323
0x00007f29aec20fde in Parser::makeStream (this=this@entry=0x1bdf950,
dict=dict@entry=0x7fff2541cad0, fileKey=fileKey@entry=0x0,
encAlgorithm=encAlgorithm@entry=cryptRC4, keyLength=keyLength@entry=0,
objNum=objNum@entry=0, objGen=objGen@entry=0, recursion=recursion@entry=1,
strict=strict@entry=false) at Parser.cc:245
0x00007f29aec216b8 in Parser::getObj (this=this@entry=0x1bdf950,
obj=obj@entry=0x7fff2541cad0, simpleOnly=simpleOnly@entry=false,
fileKey=fileKey@entry=0x0, encAlgorithm=encAlgorithm@entry=cryptRC4,
keyLength=keyLength@entry=0, objNum=objNum@entry=0, objGen=objGen@entry=0,
recursion=recursion@entry=0, strict=strict@entry=false) at Parser.cc:131
0x00007f29aec350fc in XRef::readXRef (this=this@entry=0xfe43a0,
pos=pos@entry=0xfe4438, followedXRefStm=followedXRefStm@entry=0x7fff2541cb30,
xrefStreamObjsNum=xrefStreamObjsNum@entry=0x0) at XRef.cc:551
0x00007f29aec35319 in XRef::XRef (this=0xfe43a0, strA=0x1c54ff0,
pos=<optimized out>, mainXRefEntriesOffsetA=0, wasReconstructed=0x7fff2541cbaf,
reconstruct=<optimized out>) at XRef.cc:342
0x00007f29aec2534f in PDFDoc::setup (this=this@entry=0x311e1b0,
ownerPassword=ownerPassword@entry=0x1165830,
userPassword=userPassword@entry=0x447f550) at PDFDoc.cc:262
diff --git a/poppler/Lexer.cc b/poppler/Lexer.cc
index c620529..a0a5cd0 100644
--- a/poppler/Lexer.cc
+++ b/poppler/Lexer.cc
@@ -591,7 +591,7 @@ Object *Lexer::getObj(Object *obj, const char *cmdA, int
objNum) {
comment = gFalse;
const char *cmd1 = tokBuf;
*tokBuf = 0;
- while (strcmp(cmdA, cmd1) && (objNum < 0 || xref->getNumEntry(getPos()) ==
objNum)) {
+ while (strcmp(cmdA, cmd1) && (objNum < 0 || (xref &&
xref->getNumEntry(getPos()) == objNum))) {
while (1) {
if ((c = getChar()) == EOF) {
return obj->initEOF();
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler