Module Name: src
Committed By: christos
Date: Sun Jun 21 20:08:44 UTC 2009
Modified Files:
src/dist/nawk: b.c
Log Message:
PR/40689: Nicolas Joly: awk(1) trashes memory with RE and ^ anchor
Another place to special-case HAT.
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/dist/nawk/b.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/dist/nawk/b.c
diff -u src/dist/nawk/b.c:1.17 src/dist/nawk/b.c:1.18
--- src/dist/nawk/b.c:1.17 Tue Nov 25 13:40:26 2008
+++ src/dist/nawk/b.c Sun Jun 21 16:08:44 2009
@@ -946,7 +946,8 @@
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])