Skip to content

Commit

Permalink
LUA: Fix CVE-2014-5461
Browse files Browse the repository at this point in the history
Apply the fix from upstream.

http://www.lua.org/bugs.html#5.2.2-1
https://www.opencve.io/cve/CVE-2014-5461

Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
  • Loading branch information
ryao committed Sep 24, 2022
1 parent ebe1d03 commit c55399c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/lua/ldo.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ int luaD_precall (lua_State *L, StkId func, int nresults) {
StkId base;
Proto *p = clLvalue(func)->p;
n = cast_int(L->top - func) - 1; /* number of real arguments */
luaD_checkstack(L, p->maxstacksize);
luaD_checkstack(L, p->maxstacksize + p->numparams);
for (; n < p->numparams; n++)
setnilvalue(L->top++); /* complete missing arguments */
if (!p->is_vararg) {
Expand Down

0 comments on commit c55399c

Please sign in to comment.