[poppler] Branch 'refs/remotes/origin/master' - 2 commits - poppler/Annot.cc poppler/CairoFontEngine.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sat Oct 20 07:52:36 PDT 2007


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

New commits:
commit 8bfe30a48fd7021591ab307bd51f86c06ff202b9
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 d56e50f..850b729 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 1a531dcfee1c6fc79a414c38cbe7327fbf9a59d8
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 e1bf537..8baca95 100644
--- a/poppler/CairoFontEngine.cc
+++ b/poppler/CairoFontEngine.cc
@@ -77,6 +77,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