mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-07-21 22:53:31 +02:00
17 lines
650 B
Diff
17 lines
650 B
Diff
https://salsa.debian.org/lua-team/lua5.1/-/blob/master/debian/patches/0004-Fix-stack-overflow-in-vararg-functions.patch
|
|
|
|
From: Enrico Tassi <gareuselesinge@debian.org>
|
|
Date: Tue, 26 Aug 2014 16:20:55 +0200
|
|
Subject: Fix stack overflow in vararg functions (CVE-2014-5461)
|
|
|
|
--- 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);
|
|
if (!p->is_vararg) { /* no varargs? */
|
|
base = func + 1;
|