diff options
| author | Tom Callaway <spot@fedoraproject.org> | 2016-07-25 16:08:19 -0400 |
|---|---|---|
| committer | Tom Callaway <spot@fedoraproject.org> | 2016-07-25 16:08:19 -0400 |
| commit | 19e01a142e9ab983055b2f4cdb5490a99fbd3149 (patch) | |
| tree | 1eb82335ad331e95bf86e18a8d64280a12d5e394 /lua-5.3.3-upstream-bug-1.patch | |
| parent | d6b7c55828c8f5965fd861cf6558493377f2fa1a (diff) | |
| download | lua-19e01a142e9ab983055b2f4cdb5490a99fbd3149.tar.gz lua-19e01a142e9ab983055b2f4cdb5490a99fbd3149.tar.xz lua-19e01a142e9ab983055b2f4cdb5490a99fbd3149.zip | |
apply upstream fixes for bug 1 & 2
Diffstat (limited to 'lua-5.3.3-upstream-bug-1.patch')
| -rw-r--r-- | lua-5.3.3-upstream-bug-1.patch | 25 |
1 files changed, 25 insertions, 0 deletions
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); |
