From 19e01a142e9ab983055b2f4cdb5490a99fbd3149 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 25 Jul 2016 16:08:19 -0400 Subject: apply upstream fixes for bug 1 & 2 --- lua-5.3.3-upstream-bug-1.patch | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lua-5.3.3-upstream-bug-1.patch (limited to 'lua-5.3.3-upstream-bug-1.patch') diff --git a/lua-5.3.3-upstream-bug-1.patch b/lua-5.3.3-upstream-bug-1.patch new file mode 100644 index 0000000..a35aaa9 --- /dev/null +++ b/lua-5.3.3-upstream-bug-1.patch @@ -0,0 +1,25 @@ +diff -up lua-5.3.3/src/lparser.c.crashfix lua-5.3.3/src/lparser.c +--- lua-5.3.3/src/lparser.c.crashfix 2016-07-25 16:00:14.206121141 -0400 ++++ lua-5.3.3/src/lparser.c 2016-07-25 16:00:51.910865872 -0400 +@@ -323,6 +323,8 @@ static void adjust_assign (LexState *ls, + luaK_nil(fs, reg, extra); + } + } ++ if (nexps > nvars) ++ ls->fs->freereg -= nexps - nvars; /* remove extra values */ + } + + +@@ -1160,11 +1162,8 @@ static void assignment (LexState *ls, st + int nexps; + checknext(ls, '='); + nexps = explist(ls, &e); +- if (nexps != nvars) { ++ if (nexps != nvars) + adjust_assign(ls, nvars, nexps, &e); +- if (nexps > nvars) +- ls->fs->freereg -= nexps - nvars; /* remove extra values */ +- } + else { + luaK_setoneret(ls->fs, &e); /* close last expression */ + luaK_storevar(ls->fs, &lh->v, &e); -- cgit