[poppler] poppler/Annot.cc poppler/Dict.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Aug 8 11:37:51 PDT 2013


 poppler/Annot.cc |    2 +-
 poppler/Dict.cc  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit af450a885ede5a3eac1a12734310722963764d83
Author: Thomas Freitag <Thomas.Freitag at alfa.de>
Date:   Thu Aug 8 20:33:54 2013 +0200

    use copyString where memory is freed with gfree
    
    Bug #67666

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index f0cce6d..00291f8 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -4990,7 +4990,7 @@ void AnnotWidget::generateFieldAppearance() {
   }
 
   // build the appearance stream
-  appearStream = new MemStream(strdup(appearBuf->getCString()), 0,
+  appearStream = new MemStream(copyString(appearBuf->getCString()), 0,
       appearBuf->getLength(), &appearDict);
   appearance.free();
   appearance.initStream(appearStream);
diff --git a/poppler/Dict.cc b/poppler/Dict.cc
index 3f3c022..4cf42dc 100644
--- a/poppler/Dict.cc
+++ b/poppler/Dict.cc
@@ -96,7 +96,7 @@ Dict::Dict(Dict* dictA) {
   sorted = dictA->sorted;
   entries = (DictEntry *)gmallocn(size, sizeof(DictEntry));
   for (int i=0; i<length; i++) {
-    entries[i].key = strdup(dictA->entries[i].key);
+    entries[i].key = copyString(dictA->entries[i].key);
     dictA->entries[i].val.copy(&entries[i].val);
   }
 }


More information about the poppler mailing list