[poppler] poppler/CairoFontEngine.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Sun Oct 17 05:25:25 PDT 2010


 poppler/CairoFontEngine.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d6f49aa2da15cd2e9cf775d6b1d2d04a005c8cdd
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Sun Oct 17 14:22:57 2010 +0200

    [cairo] Fix a crash when redering documents with invalid type 3 fonts

diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc
index 0d8c905..93c0ebe 100644
--- a/poppler/CairoFontEngine.cc
+++ b/poppler/CairoFontEngine.cc
@@ -693,7 +693,7 @@ CairoType3Font *CairoType3Font::create(GfxFont *gfxFont, XRef *xref,
   codeToGIDLen = 256;
   for (i = 0; i < 256; ++i) {
     codeToGID[i] = 0;
-    if ((name = enc[i])) {
+    if (charProcs && (name = enc[i])) {
       for (j = 0; j < charProcs->getLength(); j++) {
 	if (strcmp(name, charProcs->getKey(j)) == 0) {
 	  codeToGID[i] = (Gushort) j;


More information about the poppler mailing list