aboutsummaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorMike Pall <mike>2021-07-21 12:14:09 +0200
committerMike Pall <mike>2021-07-21 12:14:09 +0200
commit81a797373fa5364f7640b7f1668abada56a45d6b (patch)
tree1f41a9b2621db18577c0aeafe4e5c28b9e5e26eb /src/host
parent6ca580155b035fd369f193cdee59391b594a5028 (diff)
downloadluajit-81a797373fa5364f7640b7f1668abada56a45d6b.tar.gz
luajit-81a797373fa5364f7640b7f1668abada56a45d6b.tar.bz2
luajit-81a797373fa5364f7640b7f1668abada56a45d6b.zip
Fix minilua vararg stack handling.
Note: this is not exploitable! minilua is only used during the LuaJIT build process. It only runs controlled and static Lua code (DynASM), which is entirely contained within this repo. LuaJIT itself has completely different stack handling code and is not affected either. This change is solely for the benefit of others, who might possibly use minilua for purposes other than running DynASM.
Diffstat (limited to 'src/host')
-rw-r--r--src/host/minilua.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/minilua.c b/src/host/minilua.c
index 79150286..cfc7491d 100644
--- a/src/host/minilua.c
+++ b/src/host/minilua.c
@@ -1134,7 +1134,7 @@ if(!cl->isC){
1134CallInfo*ci; 1134CallInfo*ci;
1135StkId st,base; 1135StkId st,base;
1136Proto*p=cl->p; 1136Proto*p=cl->p;
1137luaD_checkstack(L,p->maxstacksize); 1137luaD_checkstack(L,p->maxstacksize+p->numparams);
1138func=restorestack(L,funcr); 1138func=restorestack(L,funcr);
1139if(!p->is_vararg){ 1139if(!p->is_vararg){
1140base=func+1; 1140base=func+1;