summaryrefslogtreecommitdiff
path: root/pcre_compile.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2015-03-29 15:44:40 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2015-03-29 15:44:40 +0000
commitf2f972a69aac98b34316d2e944d55f9ef2ca6712 (patch)
tree3f36d4a2ad7135645ca109cc1bec075246585511 /pcre_compile.c
parent0bff93ec6f942ad9703a33416c3ca2ddc060de73 (diff)
downloadpcre-f2f972a69aac98b34316d2e944d55f9ef2ca6712.tar.gz
Fix non-diagnosis of missing assertion after (?(?< not followed by ! or =.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1539 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_compile.c')
-rw-r--r--pcre_compile.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/pcre_compile.c b/pcre_compile.c
index 810df84..94e78db 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -2497,7 +2497,7 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
empty_branch = FALSE;
do
{
- if (!empty_branch && could_be_empty_branch(code, endcode, utf, cd,
+ if (!empty_branch && could_be_empty_branch(code, endcode, utf, cd,
recurses)) empty_branch = TRUE;
code += GET(code, 1);
}
@@ -6476,18 +6476,18 @@ for (;; ptr++)
/* First deal with comments. Putting this code right at the start ensures
that comments have no bad side effects. */
-
- if (ptr[0] == CHAR_QUESTION_MARK && ptr[1] == CHAR_NUMBER_SIGN)
- {
- ptr += 2;
+
+ if (ptr[0] == CHAR_QUESTION_MARK && ptr[1] == CHAR_NUMBER_SIGN)
+ {
+ ptr += 2;
while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
- if (*ptr == CHAR_NULL)
- {
- *errorcodeptr = ERR18;
- goto FAILED;
- }
- continue;
- }
+ if (*ptr == CHAR_NULL)
+ {
+ *errorcodeptr = ERR18;
+ goto FAILED;
+ }
+ continue;
+ }
/* Now deal with various "verbs" that can be introduced by '*'. */
@@ -6679,7 +6679,9 @@ for (;; ptr++)
if (tempptr[1] == CHAR_QUESTION_MARK &&
(tempptr[2] == CHAR_EQUALS_SIGN ||
tempptr[2] == CHAR_EXCLAMATION_MARK ||
- tempptr[2] == CHAR_LESS_THAN_SIGN))
+ (tempptr[2] == CHAR_LESS_THAN_SIGN &&
+ (tempptr[3] == CHAR_EQUALS_SIGN ||
+ tempptr[3] == CHAR_EXCLAMATION_MARK))))
{
cd->iscondassert = TRUE;
break;