[poppler] Branch 'poppler-0.6' - 2 commits - poppler/Annot.cc poppler/CairoFontEngine.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Fri Oct 19 07:09:30 PDT 2007


 poppler/Annot.cc           |    3 ++-
 poppler/CairoFontEngine.cc |    6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 63e1c518ddb015715ef291957d440d8709622b97
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Fri Oct 19 15:46:50 2007 +0200

    Do not generate appearance stream for radio button that are not active

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 51dd904..894f60f 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -536,7 +536,8 @@ void Annot::generateFieldAppearance(Dict *field, Dict *annot, Dict *acroForm) {
     if (ff & fieldFlagRadio) {
       //~ Acrobat doesn't draw a caption if there is no AP dict (?)
       if (Form::fieldLookup(field, "V", &obj1)->isName()) {
-        if (annot->lookup("AS", &obj2)->isName(obj1.getName())) {
+        if (annot->lookup("AS", &obj2)->isName(obj1.getName()) &&
+	    strcmp (obj1.getName(), "Off") != 0) {
           if (caption) {
             drawText(caption, da, fontDict, gFalse, 0, fieldQuadCenter,
                 gFalse, gTrue);
commit 170566c7128dd2c8737f1b6568d2160311ec45ca
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Fri Oct 19 13:12:24 2007 +0200

    Fix a crash with invalid embedded fonts

diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc
index b080244..28d1bcc 100644
--- a/poppler/CairoFontEngine.cc
+++ b/poppler/CairoFontEngine.cc
@@ -79,6 +79,12 @@ CairoFont *CairoFont::create(GfxFont *gfxFont, XRef *xref, FT_Library lib, GBool
     refObj.initRef(embRef.num, embRef.gen);
     refObj.fetch(xref, &strObj);
     refObj.free();
+    if (!strObj.isStream()) {
+      error(-1, "Embedded font object is wrong type");
+      strObj.free();
+      fclose(tmpFile);
+      goto err2;
+    }
     strObj.streamReset();
     while ((c = strObj.streamGetChar()) != EOF) {
       fputc(c, tmpFile);


More information about the poppler mailing list