termux-packages/packages/liblua51/lua-5.1.5-CVE-2014-5461.patch
2022-02-06 09:39:33 +09:00

15 lines
419 B
Diff

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-5461
https://www.lua.org/bugs.html#5.2.2-1
--- a/src/ldo.c
+++ b/src/ldo.c
@@ -274,7 +274,7 @@
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;