iptables: bump to version 1.6.1
[buildroot-gz.git] / package / lua / 5.3.3 / 0012-fix-loop-parser.patch
blob7b321e5ddf0e27e0407e2cb24527c323dafc3d23
1 Expression list with four or more expressions in a 'for' loop can crash the interpreter.
3 Fetch from: https://www.lua.org/bugs.html#5.3.3-1
5 Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
7 --- a/src/lparser.c
8 +++ b/src/lparser.c
9 @@ -323,6 +323,8 @@
10 luaK_nil(fs, reg, extra);
13 + if (nexps > nvars)
14 + ls->fs->freereg -= nexps - nvars; /* remove extra values */
18 @@ -1160,11 +1162,8 @@
19 int nexps;
20 checknext(ls, '=');
21 nexps = explist(ls, &e);
22 - if (nexps != nvars) {
23 + if (nexps != nvars)
24 adjust_assign(ls, nvars, nexps, &e);
25 - if (nexps > nvars)
26 - ls->fs->freereg -= nexps - nvars; /* remove extra values */
27 - }
28 else {
29 luaK_setoneret(ls->fs, &e); /* close last expression */
30 luaK_storevar(ls->fs, &lh->v, &e);
31 --