CBL-Mariner/SPECS/memcached/CVE-2021-45985.patch

16 lines
657 B
Diff

diff --git a/vendor/lua/src/ldo.c b/vendor/lua/src/ldo.c
index 7135079..d81e731 100644
--- a/vendor/lua/src/ldo.c
+++ b/vendor/lua/src/ldo.c
@@ -483,9 +483,9 @@ void luaD_pretailcall (lua_State *L, CallInfo *ci, StkId func, int narg1) {
int fsize = p->maxstacksize; /* frame size */
int nfixparams = p->numparams;
int i;
+ checkstackGC(L, fsize);
for (i = 0; i < narg1; i++) /* move down function and arguments */
setobjs2s(L, ci->func + i, func + i);
- checkstackGC(L, fsize);
func = ci->func; /* moved-down function */
for (; narg1 <= nfixparams; narg1++)
setnilvalue(s2v(func + narg1)); /* complete missing arguments */