aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/pcre/pcre_compile.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-08-29 18:28:23 +0200
committerRickard Green <[email protected]>2017-08-29 18:28:23 +0200
commitcdcbf85b4f00f8dc2f61e895055943fc7209027c (patch)
tree1045f81f2a5a825222c355701cf4b5e30f20c393 /erts/emulator/pcre/pcre_compile.c
parenta230f26086b3db9097f06d4bb91fb3b2e9379c77 (diff)
downloadotp-cdcbf85b4f00f8dc2f61e895055943fc7209027c.tar.gz
otp-cdcbf85b4f00f8dc2f61e895055943fc7209027c.tar.bz2
otp-cdcbf85b4f00f8dc2f61e895055943fc7209027c.zip
Upgrade to PCRE 8.41 from PCRE 8.40
Diffstat (limited to 'erts/emulator/pcre/pcre_compile.c')
-rw-r--r--erts/emulator/pcre/pcre_compile.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/erts/emulator/pcre/pcre_compile.c b/erts/emulator/pcre/pcre_compile.c
index 6e841c9cf8..e79284ab79 100644
--- a/erts/emulator/pcre/pcre_compile.c
+++ b/erts/emulator/pcre/pcre_compile.c
@@ -5740,6 +5740,21 @@ for (;; ptr++)
ptr = p - 1; /* Character before the next significant one. */
}
+ /* We also need to skip over (?# comments, which are not dependent on
+ extended mode. */
+
+ if (ptr[1] == CHAR_LEFT_PARENTHESIS && ptr[2] == CHAR_QUESTION_MARK &&
+ ptr[3] == CHAR_NUMBER_SIGN)
+ {
+ ptr += 4;
+ while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
+ if (*ptr == CHAR_NULL)
+ {
+ *errorcodeptr = ERR18;
+ goto FAILED;
+ }
+ }
+
/* If the next character is '+', we have a possessive quantifier. This
implies greediness, whatever the setting of the PCRE_UNGREEDY option.
If the next character is '?' this is a minimizing repeat, by default,
@@ -8211,7 +8226,6 @@ for (;; ptr++)
if (mclength == 1 || req_caseopt == 0)
{
- firstchar = mcbuffer[0] | req_caseopt;
firstchar = mcbuffer[0];
firstcharflags = req_caseopt;