- widen gototab so NCHARS states fits.
- don't allocate more space than we need. From Aleksey Cheusov
This commit is contained in:
parent
3ce3b9b485
commit
80f0134faf
|
@ -216,7 +216,7 @@ typedef struct rrow {
|
|||
} rrow;
|
||||
|
||||
typedef struct fa {
|
||||
uschar **gototab;
|
||||
unsigned short **gototab;
|
||||
uschar *out;
|
||||
uschar *restr;
|
||||
int **posns;
|
||||
|
|
|
@ -103,7 +103,7 @@ resize_state(fa *fa, int state)
|
|||
fa->posns = p;
|
||||
|
||||
for (i = fa->state_count; i < new_count; ++i) {
|
||||
fa->gototab[i] = calloc(1, NCHARS * sizeof (*fa->gototab));
|
||||
fa->gototab[i] = calloc(1, NCHARS * sizeof (**fa->gototab));
|
||||
if (fa->gototab[i] == NULL)
|
||||
goto out;
|
||||
fa->out[i] = 0;
|
||||
|
|
Loading…
Reference in New Issue