diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2013-03-03 10:42:46 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2013-03-03 10:42:46 +0000 |
commit | d9fc8663fba279484ba2f0e30d8bcf024b364f00 (patch) | |
tree | 5327f55b15210276c0c88c2d9fa3c0bf0d20c57b | |
parent | 8994a37d2cb9682f1b37f4f9cc0be9bacd99a221 (diff) | |
download | pcre-d9fc8663fba279484ba2f0e30d8bcf024b364f00.tar.gz |
Fix missing callout in alternative of conditional group when auto callout is
set.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1265 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | pcre_exec.c | 1 | ||||
-rw-r--r-- | testdata/testoutput2 | 3 |
3 files changed, 9 insertions, 0 deletions
@@ -84,6 +84,11 @@ Version 8.33 xx-xxxx-201x which points out that "non characters" are not "characters that may not appear in Unicode strings" but rather "characters that are reserved for internal use and have only local meaning". + +22. When a pattern was compiled with automatic callouts (PCRE_AUTO_CALLOUT) and + there was a conditional group that depended on an assertion, if the + assertion was false, the callout that immediately followed the alternation + in the condition was skipped when pcre_exec() was used for matching. Version 8.32 30-November-2012 diff --git a/pcre_exec.c b/pcre_exec.c index 1338927..3a0745e 100644 --- a/pcre_exec.c +++ b/pcre_exec.c @@ -1318,6 +1318,7 @@ for (;;) if (rrc < 0) RRETURN(rrc); } ecode += PRIV(OP_lengths)[OP_CALLOUT]; + codelink -= PRIV(OP_lengths)[OP_CALLOUT]; } condcode = ecode[LINK_SIZE+1]; diff --git a/testdata/testoutput2 b/testdata/testoutput2 index e194de8..cdb186e 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -9277,6 +9277,7 @@ No need char +7 ^ ^ b +7 ^^ b +7 ^ b ++11 ^ ^ +12 ^ ) +13 ^ 0: @@ -9407,12 +9408,14 @@ No match +3 ^ ^ (?(?=[a])[^"]) +5 ^ ^ (?=[a]) +8 ^ ^ [a] ++17 ^ ^ | +21 ^ ^ " +18 ^ ^ b +19 ^ ^ ) +3 ^ ^ (?(?=[a])[^"]) +5 ^ ^ (?=[a]) +8 ^ ^ [a] ++17 ^ ^ | +21 ^ ^ " +22 ^ ^ $ +23 ^ ^ |