mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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:
parent
9a1501ae89
commit
c1520c9e11
1 changed files with 1 additions and 1 deletions
|
@ -274,7 +274,7 @@ int luaD_precall (lua_State *L, StkId func, int nresults) {
|
||||||
CallInfo *ci;
|
CallInfo *ci;
|
||||||
StkId st, base;
|
StkId st, base;
|
||||||
Proto *p = cl->p;
|
Proto *p = cl->p;
|
||||||
luaD_checkstack(L, p->maxstacksize);
|
luaD_checkstack(L, p->maxstacksize + p->numparams);
|
||||||
func = restorestack(L, funcr);
|
func = restorestack(L, funcr);
|
||||||
if (!p->is_vararg) { /* no varargs? */
|
if (!p->is_vararg) { /* no varargs? */
|
||||||
base = func + 1;
|
base = func + 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue