[poppler] poppler/PDFDoc.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Sat Sep 2 21:00:25 UTC 2017
poppler/PDFDoc.cc | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 048237db6a7122a5769a15c7dd3ae3680e06e9bb
Author: Albert Astals Cid <aacid at kde.org>
Date: Sat Sep 2 22:59:32 2017 +0200
pdfunite: Fix API porting error that caused abort in some cases
We need to check for xRef->getTrailerDict() existing before accessing xRef->getDocInfo();
diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index bc651dda..da2c266b 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -1377,12 +1377,14 @@ Object PDFDoc::createTrailerDict(int uxrefSize, GBool incrUpdate, Goffset startx
message.append(buffer);
//info dict -- only use text string
- Object docInfo = xRef->getDocInfo();
- if (!xRef->getTrailerDict()->isNone() && docInfo.isDict()) {
- for(int i=0; i<docInfo.getDict()->getLength(); i++) {
- Object obj2 = docInfo.getDict()->getVal(i);
- if (obj2.isString()) {
- message.append(obj2.getString());
+ if (!xRef->getTrailerDict()->isNone()) {
+ Object docInfo = xRef->getDocInfo();
+ if (docInfo.isDict()) {
+ for(int i=0; i<docInfo.getDict()->getLength(); i++) {
+ Object obj2 = docInfo.getDict()->getVal(i);
+ if (obj2.isString()) {
+ message.append(obj2.getString());
+ }
}
}
}
More information about the poppler
mailing list