summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-03-12 11:36:14 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-03-12 11:36:14 +0000
commitd4c7d9db849960a74f20a9deb1d3a457993f5d70 (patch)
treeebd0f629bd960d547aa0ec4bcae25d53b94ac9a1
parent8ffb249b85b3f43b112ca99c6ee7d40ecc755c38 (diff)
downloadpcre-d4c7d9db849960a74f20a9deb1d3a457993f5d70.tar.gz
Valgrind showed up a bug in bug fix 7.1/12 which is now fixed.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@120 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--pcre_exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pcre_exec.c b/pcre_exec.c
index ecfe35f..7d059f0 100644
--- a/pcre_exec.c
+++ b/pcre_exec.c
@@ -2120,10 +2120,11 @@ for (;;)
}
if (possessive) continue;
- while (eptr >= pp)
+ for(;;)
{
RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (eptr == pp) RRETURN(MATCH_NOMATCH);
#ifdef SUPPORT_UCP
eptr--;
BACKCHAR(eptr);
@@ -2131,7 +2132,6 @@ for (;;)
eptr -= length;
#endif /* SUPPORT_UCP */
}
- RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
}