From e9a7702427a897bc4ac0e5b78c91a954c0a6fe4a Mon Sep 17 00:00:00 2001
From: Norihiro Tanaka <noritnk@kcn.ne.jp>
Date: Wed, 8 Oct 2014 21:20:27 -0700
Subject: [PATCH] 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
---
 src/dfa.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/dfa.c b/src/dfa.c
index 2e61982..58a4b83 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++];
             }

-- 
2.0.0.421.g786a89d

