diff options
author | Yossi Gottlieb <yossigo@gmail.com> | 2020-08-31 20:42:46 +0300 |
---|---|---|
committer | Oran Agra <oran@redislabs.com> | 2020-10-27 08:49:22 +0200 |
commit | ee91248505d45b37896d3778ebc1ec5678093a92 (patch) | |
tree | b413519fb2eee30a55a4f6e9f03706110a93adcf | |
parent | 3cf3beff2c339f3ceaff70e5c225aa9c2ad6f8d0 (diff) | |
download | redis-ee91248505d45b37896d3778ebc1ec5678093a92.tar.gz |
Backport Lua 5.2.2 stack overflow fix. (#7733)
This fixes the issue described in CVE-2014-5461. At this time we cannot
confirm that the original issue has a real impact on Redis, but it is
included as an extra safety measure.
(cherry picked from commit d75ad774a92bd7de0b9448be3d622d7a13b7af27)
(cherry picked from commit 941174d9c9ed438f1c70dd46cddc02468614db12)
-rw-r--r-- | deps/lua/src/ldo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/lua/src/ldo.c b/deps/lua/src/ldo.c index 514f7a2a3..939940a4c 100644 --- a/deps/lua/src/ldo.c +++ b/deps/lua/src/ldo.c @@ -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; |