mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-30 08:02:38 -05:00
32fddd8e29
* gnu/packages/lua.scm (lua-5.1)[source]: Add patch. * gnu/packages/patches/lua-CVE-2014-5461: New file. * gnu/local.mk (dist_patch_DATA): Add it.
20 lines
603 B
Diff
20 lines
603 B
Diff
From: Enrico Tassi <gareuselesinge@debian.org>
|
|
Date: Tue, 26 Aug 2014 16:20:55 +0200
|
|
Subject: Fix stack overflow in vararg functions
|
|
|
|
---
|
|
src/ldo.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/ldo.c b/src/ldo.c
|
|
index d1bf786..30333bf 100644
|
|
--- a/src/ldo.c
|
|
+++ b/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);
|
|
base = func + 1;
|