lua: apply patch for "Stack overflow in vararg functions with many fixed parameters called with few arguments"

known as CVE-2014-5461
This commit is contained in:
sfan5 2024-06-24 17:30:47 +02:00
parent fe6da3a16b
commit b70a4b9bca

@ -274,7 +274,7 @@ int luaD_precall (lua_State *L, StkId func, int nresults) {
CallInfo *ci;
StkId st, base;
Proto *p = cl->p;
luaD_checkstack(L, p->maxstacksize);
luaD_checkstack(L, p->maxstacksize + p->numparams);
func = restorestack(L, funcr);
if (!p->is_vararg) { /* no varargs? */
base = func + 1;