From 9b304d53b807e4baaf128a6f15ec176fca4dba6f Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 20 Jun 2011 20:39:13 +0300 Subject: Add fix for crash from grep, add test case. --- dfa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dfa.c') diff --git a/dfa.c b/dfa.c index 0c110548..228c9090 100644 --- a/dfa.c +++ b/dfa.c @@ -2137,7 +2137,7 @@ dfaanalyze (struct dfa *d, int searchflag) MALLOC(lastpos, position, d->nleaves); o_lastpos = lastpos, lastpos += d->nleaves; CALLOC(nalloc, int, d->tindex); - MALLOC(merged.elems, position, d->nleaves); + MALLOC(merged.elems, position, 2 * d->nleaves); CALLOC(d->follows, position_set, d->tindex); -- cgit v1.2.3