summaryrefslogtreecommitdiff
path: root/src/pcre2_compile.c
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2019-06-11 07:37:29 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2019-06-11 07:37:29 +0000
commit12d1b642e4fc9a29240ef519e26cabe6d8290630 (patch)
tree59c3a64337efbcaf04f65c67bba6376fb2196bf9 /src/pcre2_compile.c
parent223899c5055f2f9def65be3132a11e6f2fbd3776 (diff)
downloadpcre2-12d1b642e4fc9a29240ef519e26cabe6d8290630.tar.gz
Fix minor oversight in previous patch. Fixes clusterfuzz 15199.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1102 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/pcre2_compile.c')
-rw-r--r--src/pcre2_compile.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c
index 739c919..eb5f66d 100644
--- a/src/pcre2_compile.c
+++ b/src/pcre2_compile.c
@@ -2448,7 +2448,7 @@ must be last. */
enum { RANGE_NO, RANGE_STARTED, RANGE_OK_ESCAPED, RANGE_OK_LITERAL };
/* Only in 32-bit mode can there be literals > META_END. A macro encapsulates
-the storing of literal values in the main parsed pattern, where they can always
+the storing of literal values in the main parsed pattern, where they can always
be quantified. */
#if PCRE2_CODE_UNIT_WIDTH == 32
@@ -2642,10 +2642,10 @@ while (ptr < ptrend)
default: /* Don't use PARSED_LITERAL() because it */
#if PCRE2_CODE_UNIT_WIDTH == 32 /* sets okquantifier. */
if (c >= META_END) *parsed_pattern++ = META_BIGVALUE;
-#endif
+#endif
*parsed_pattern++ = c;
break;
-
+
case CHAR_RIGHT_PARENTHESIS:
inverbname = FALSE;
/* This is the length in characters */
@@ -2681,8 +2681,11 @@ while (ptr < ptrend)
switch(escape)
{
- case 0:
- PARSED_LITERAL(c, parsed_pattern);
+ case 0: /* Don't use PARSED_LITERAL() because it */
+#if PCRE2_CODE_UNIT_WIDTH == 32 /* sets okquantifier. */
+ if (c >= META_END) *parsed_pattern++ = META_BIGVALUE;
+#endif
+ *parsed_pattern++ = c;
break;
case ESC_Q:
@@ -3793,7 +3796,7 @@ while (ptr < ptrend)
/* Remember where this verb, possibly with a preceding (*MARK), starts,
for handling quantified (*ACCEPT). */
-
+
verbstartptr = parsed_pattern;
okquantifier = (verbs[i].meta == META_ACCEPT);