From 3d50fca30f7809fdcf80196ce456d6d005eb3af9 Mon Sep 17 00:00:00 2001 From: jnemeth Date: Wed, 7 Jun 2006 09:24:26 +0000 Subject: prevent "stack" overflow --- atc/input.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'atc/input.c') diff --git a/atc/input.c b/atc/input.c index 64b202a1..2eef9053 100644 --- a/atc/input.c +++ b/atc/input.c @@ -1,4 +1,4 @@ -/* $NetBSD: input.c,v 1.19 2005/08/10 17:53:28 rpaulo Exp $ */ +/* $NetBSD: input.c,v 1.20 2006/06/07 09:24:26 jnemeth Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -46,7 +46,7 @@ #if 0 static char sccsid[] = "@(#)input.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: input.c,v 1.19 2005/08/10 17:53:28 rpaulo Exp $"); +__RCSID("$NetBSD: input.c,v 1.20 2006/06/07 09:24:26 jnemeth Exp $"); #endif #endif /* not lint */ @@ -207,6 +207,7 @@ push(int ruleno, int ch) { int newstate, newpos; + assert(level < (MAXDEPTH - 1)); (void)sprintf(T_STR, st[T_STATE].rule[ruleno].str, tval); T_RULE = ruleno; T_CH = ch; -- cgit v1.2.3