summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-08-31 09:30:47 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-08-31 09:30:47 +0000
commitaa33a712112ba616d83b95ead228b640dc6df765 (patch)
treeb79d10d2d1680383a2b6c8a753e7afee235096a1 /Build/source
parent1fc0936f4a8aeb63273da0251cc2c0b91412c7ec (diff)
luaTeX: Bugfix: Avoid potential segmentation fault
git-svn-id: svn://tug.org/texlive/trunk@38253 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lepdflib.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index dce4f32ceea..18badf6c886 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-31 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * lua/lepdflib.cc: Bugfix: m_Object_dictAdd() must use a copy of
+ the Lua string s, otherwise m_Dict_remove() would destroy it.
+
2015-08-29 Peter Breitenlohner <peb@mppmu.mpg.de>
* image/epdf.h, lua/lepdflib.cc: Drop HAVE_STRUCTTREEROOT_H,
diff --git a/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc b/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
index 079bfd986f8..cb1795bdf38 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
+++ b/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
@@ -1826,7 +1826,7 @@ static int m_Object_dictAdd(lua_State * L)
pdfdoc_changed_error(L);
if (!((Object *) uin->d)->isDict())
luaL_error(L, "Object is not a Dict");
- ((Object *) uin->d)->dictAdd((char *) s, (Object *) uobj->d);
+ ((Object *) uin->d)->dictAdd(copyString(s), (Object *) uobj->d);
return 0;
}