prevent lua from blowing up the c stack

from lua author roberto ierusalimschy via pedro martelletto
This commit is contained in:
jolan 2007-09-15 09:42:57 +00:00
parent 001f557a39
commit 85fd4335b9
2 changed files with 14 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.30 2007/08/05 12:34:33 mbalmer Exp $
# $OpenBSD: Makefile,v 1.31 2007/09/15 09:42:57 jolan Exp $
COMMENT= "powerful, light-weight programming language"
DISTNAME= lua-5.1.2
PKGNAME= ${DISTNAME}p0
PKGNAME= ${DISTNAME}p1
CATEGORIES= lang
MASTER_SITES= http://www.lua.org/ftp/ \

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_lparser_c,v 1.1 2007/09/15 09:42:57 jolan Exp $
--- src/lparser.c.orig Tue Jul 31 02:55:45 2007
+++ src/lparser.c Tue Jul 31 02:57:35 2007
@@ -938,6 +938,8 @@ static void assignment (LexState *ls, struct LHS_assig
primaryexp(ls, &nv.v);
if (nv.v.k == VLOCAL)
check_conflict(ls, lh, &nv.v);
+ luaY_checklimit(ls->fs, ls->L->nCcalls + nvars, LUAI_MAXCCALLS,
+ "variable names");
assignment(ls, &nv, nvars+1);
}
else { /* assignment -> `=' explist1 */