[poppler] fofi/FoFiType1C.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Fri Jul 30 11:30:18 PDT 2010
fofi/FoFiType1C.cc | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 842209782ca3ba8c1c783cccf565372a18b3fda5
Author: Albert Astals Cid <aacid at kde.org>
Date: Fri Jul 30 19:29:12 2010 +0100
Do not crash when using pdftops in some files
Fixes crash in file in kde bug 246269. The output is still wrong though
diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index 43deb19..9c5b10c 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -13,7 +13,7 @@
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
-// Copyright (C) 2009 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2009, 2010 Albert Astals Cid <aacid at kde.org>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -804,10 +804,12 @@ void FoFiType1C::convertToType0(char *psName,
//~ to handle multiple FDs correctly, need to somehow divide the
//~ font up by FD; as a kludge we ignore CID 0, which is .notdef
fd = 0;
- for (j = i==0 ? 1 : 0; j < 256 && i+j < nCIDs; ++j) {
- if (cidMap[i+j] >= 0) {
- fd = fdSelect[cidMap[i+j]];
- break;
+ if (fdSelect != NULL) {
+ for (j = i==0 ? 1 : 0; j < 256 && i+j < nCIDs; ++j) {
+ if (cidMap[i+j] >= 0) {
+ fd = fdSelect[cidMap[i+j]];
+ break;
+ }
}
}
More information about the poppler
mailing list