diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2015-07-22 09:06:15 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2015-07-22 09:06:15 +0000 |
commit | 7c9f98aa0d1ba2605294670d896ba36cf63edf04 (patch) | |
tree | 6416a87c739c4833fea581b8f9c2ece49f7446dd /pcre_compile.c | |
parent | 960abe1e888bcd1c76b3d3465f91aa186ae33058 (diff) | |
download | pcre-7c9f98aa0d1ba2605294670d896ba36cf63edf04.tar.gz |
Fix bad compilation of repeated conditional with only one branch.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1581 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_compile.c')
-rw-r--r-- | pcre_compile.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pcre_compile.c b/pcre_compile.c index bc88c76..e9d1052 100644 --- a/pcre_compile.c +++ b/pcre_compile.c @@ -6274,7 +6274,13 @@ for (;; ptr++) } while (*scode == OP_ALT); } + + /* A conditional group with only one branch has an implicit empty + alternative branch. */ + if (*bracode == OP_COND && bracode[GET(bracode,1)] != OP_ALT) + *bracode = OP_SCOND; + /* Handle possessive quantifiers. */ if (possessive_quantifier) |