Fix memory corruption manifested on 32 bit binaries (#58)
* Don't update gototab entries for HAT (corrupts memory)
This commit is contained in:
parent
416c6db5ee
commit
af86dacfad
2
b.c
2
b.c
@ -1273,6 +1273,7 @@ int cgoto(fa *f, int s, int c)
|
||||
if (tmpset[j] != p[j])
|
||||
goto different;
|
||||
/* setvec is state i */
|
||||
if (c != HAT)
|
||||
f->gototab[s][c] = i;
|
||||
return i;
|
||||
different:;
|
||||
@ -1287,6 +1288,7 @@ int cgoto(fa *f, int s, int c)
|
||||
p = intalloc(setcnt + 1, __func__);
|
||||
|
||||
f->posns[f->curstat] = p;
|
||||
if (c != HAT)
|
||||
f->gototab[s][c] = f->curstat;
|
||||
for (i = 0; i <= setcnt; i++)
|
||||
p[i] = tmpset[i];
|
||||
|
Loading…
Reference in New Issue
Block a user