summaryrefslogtreecommitdiff
path: root/dfa.c
diff options
context:
space:
mode:
authorVern Paxson <vern@ee.lbl.gov>2000-08-21 16:37:01 +0000
committerVern Paxson <vern@ee.lbl.gov>2000-08-21 16:37:01 +0000
commit74656baab5891186cccfe78058862ac0f7f2c65d (patch)
tree56ca4f0a3f0c210eae04e58273aaf5a6cbbfa5ad /dfa.c
parent976a9a16452d22ba2c79fa7806941ba1c1e771a2 (diff)
fixed underallocation for accset
Diffstat (limited to 'dfa.c')
-rw-r--r--dfa.c5
1 files changed, 4 insertions, 1 deletions
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