PR/40689: Nicolas Joly: awk(1) trashes memory with RE and ^ anchor

Another place to special-case HAT.
This commit is contained in:
christos 2009-06-21 20:08:44 +00:00
parent 716317980c
commit ac0ec62cd0

3
dist/nawk/b.c vendored
View File

@ -946,7 +946,8 @@ int cgoto(fa *f, int s, int c)
overflo("out of space in cgoto");
f->posns[f->curstat] = p;
f->gototab[s][c] = f->curstat;
if (c != HAT)
f->gototab[s][c] = f->curstat;
for (i = 0; i <= setcnt; i++)
p[i] = tmpset[i];
if (setvec[f->accept])