mirror of
https://github.com/minetest/minetest.git
synced 2024-07-04 15:05:27 +02:00
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:
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;
|
||||
|
Loading…
Reference in New Issue
Block a user