summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorihiro Tanaka <noritnk@kcn.ne.jp>2014-10-08 21:20:27 -0700
committerJim Meyering <meyering@fb.com>2014-10-08 21:20:27 -0700
commite9a7702427a897bc4ac0e5b78c91a954c0a6fe4a (patch)
tree5a2de65ee748d40d210e0c311d4a6ed38c494972
parent8e7b0f074002b60b8804837841b39ccea3efc770 (diff)
downloadgrep-e9a7702427a897bc4ac0e5b78c91a954c0a6fe4a.tar.gz
dfa: fix a theoretical bug
* src/dfa.c (dfaexec_main): After searching for a match from the initial state, set the previous state, S1, to 0. So far, we have found no case in which this fix makes a difference. See http://debbugs.gnu.org/18645
-rw-r--r--src/dfa.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dfa.c b/src/dfa.c
index 2e619826..58a4b832 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3388,6 +3388,7 @@ dfaexec_main (struct dfa *d, char const *begin, char *end,
{
while (t[*p] == 0)
p++;
+ s1 = 0;
s = t[*p++];
}