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

known as CVE-2014-5461
<https://sources.debian.org/src/lua5.1/5.1.5-9/debian/patches/0004-Fix-stack-overflow-in-vararg-functions.patch/>
This commit is contained in:
sfan5 2024-06-24 17:30:47 +02:00
parent 9a1501ae89
commit c1520c9e11

@ -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;