Subject: bug#17447: [PATCH] dfa: fix mismatch of exit conditions due to whether multibyte flag is on or off

From: Norihiro Tanaka <[email-masked]>
Date: Fri, 09 May 2014 23:18:36 +0900

When multibyte flag is on, exit condition is `p >= end'.  OTOH, when off,
it's `p > end'.  I think that the later is right, and fix the former.
From 052f4b7c671bfe5221caf687e819d635d9513147 Mon Sep 17 00:00:00 2001
From: Norihiro Tanaka <[email-masked]>
Date: Fri, 9 May 2014 15:28:38 +0900
Subject: [PATCH] dfa: fix mismatch of exit conditions due to whether multibyte
 flag is on or off

* src/dfa.c (dfaexec): Fix it.
---
 src/dfa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dfa.c b/src/dfa.c
index fc6ce72..2a326e6 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3318,7 +3318,7 @@ dfaexec (struct dfa *d, char const *begin, char *end,
                                          end - (char const *) mbp, d);
                   p = mbp;
 
-                  if ((char *) p >= end)
+                  if ((char *) p > end)
                     {
                       p = NULL;
                       goto done;
-- 
1.9.2