diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2014-11-19 20:57:13 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2014-11-19 20:57:13 +0000 |
commit | 48d2472840efc4dc54dfc698d64aa086332a9033 (patch) | |
tree | 31541d6e593e9c3dd3dd5c9ff0c90fe656183ebd /pcre_exec.c | |
parent | 54d040f3c6c1dd5b3f2256ac6c9391903803a5a6 (diff) | |
download | pcre-48d2472840efc4dc54dfc698d64aa086332a9033.tar.gz |
Fix zero-repeat assertion condition bug.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1513 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_exec.c')
-rw-r--r-- | pcre_exec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pcre_exec.c b/pcre_exec.c index fdf7067..bb5620d 100644 --- a/pcre_exec.c +++ b/pcre_exec.c @@ -1404,8 +1404,11 @@ for (;;) condition = TRUE; /* Advance ecode past the assertion to the start of the first branch, - but adjust it so that the general choosing code below works. */ - + but adjust it so that the general choosing code below works. If the + assertion has a quantifier that allows zero repeats we must skip over + the BRAZERO. This is a lunatic thing to do, but somebody did! */ + + if (*ecode == OP_BRAZERO) ecode++; ecode += GET(ecode, 1); while (*ecode == OP_ALT) ecode += GET(ecode, 1); ecode += 1 + LINK_SIZE - PRIV(OP_lengths)[condcode]; |