diff options
author | Vern Paxson <vern@ee.lbl.gov> | 2000-08-21 16:37:01 +0000 |
---|---|---|
committer | Vern Paxson <vern@ee.lbl.gov> | 2000-08-21 16:37:01 +0000 |
commit | 74656baab5891186cccfe78058862ac0f7f2c65d (patch) | |
tree | 56ca4f0a3f0c210eae04e58273aaf5a6cbbfa5ad /dfa.c | |
parent | 976a9a16452d22ba2c79fa7806941ba1c1e771a2 (diff) |
fixed underallocation for accset
Diffstat (limited to 'dfa.c')
-rw-r--r-- | dfa.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |