From 74656baab5891186cccfe78058862ac0f7f2c65d Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Mon, 21 Aug 2000 16:37:01 +0000 Subject: [PATCH] fixed underallocation for accset --- dfa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dfa.c b/dfa.c index fecefa8..060a993 100644 --- a/dfa.c +++ b/dfa.c @@ -413,7 +413,10 @@ void ntod() int duplist[CSIZE + 1], state[CSIZE + 1]; int targfreq[CSIZE + 1], targstate[CSIZE + 1]; - accset = allocate_integer_array( num_rules + 1 ); + /* accset needs to be large enough to hold all of the rules present + * in the input, *plus* their YY_TRAILING_HEAD_MASK variants. + */ + accset = allocate_integer_array( (num_rules + 1) * 2 ); nset = allocate_integer_array( current_max_dfa_size ); /* The "todo" queue is represented by the head, which is the DFA -- 2.40.0