Make dict::set() make a copy of the string if it is going to be add()ed.
diff --git a/poppler/Dict.cc b/poppler/Dict.cc
index 0ee94d7..0c74566 100644
--- a/poppler/Dict.cc
+++ b/poppler/Dict.cc
@@ -91,7 +91,7 @@
     e->val.free();
     e->val = *val;
   } else {
-    add (key, val);
+    add (copyString(key), val);
   }
 }