mediawiki-extensions-Scribunto/includes/engines/LuaStandalone/binaries/CVE-2014-5461.patch
Kunal Mehta 237d059ea1 Add lua5.1 patch for CVE-2014-5461
For whenever anyone else has to recompile the binaries, it's easier if
the patch file is in git.

I copied it directly out of T72541, and verified with:
 patch -p1 < ../CVE-2014-5461.patch
in the lua5.1 source tree.

Change-Id: I714a9d55096d9b5d081cd3e54f3b2e6848dcafef
2019-01-08 21:33:47 -08:00

12 lines
418 B
Diff

--- lua5.1-5.1.5.orig/src/ldo.c 2012-01-17 21:27:10.000000000 -0500
+++ lua5.1-5.1.5/src/ldo.c 2014-09-02 12:01:46.575057692 -0400
@@ -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;