diff options
author | Rickard Green <[email protected]> | 2017-08-31 14:34:07 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-08-31 14:34:07 +0200 |
commit | 919ddb608125db223f43b328e53fae37cab312ce (patch) | |
tree | bff19d67bcd53048c1c4c4c4df60be09bcd88064 /erts/emulator/pcre/pcre_compile.c | |
parent | c8e6fc560fc8fd2f0e993975d33a017503f0489b (diff) | |
parent | cdcbf85b4f00f8dc2f61e895055943fc7209027c (diff) | |
download | otp-919ddb608125db223f43b328e53fae37cab312ce.tar.gz otp-919ddb608125db223f43b328e53fae37cab312ce.tar.bz2 otp-919ddb608125db223f43b328e53fae37cab312ce.zip |
Merge branch 'rickard/pcre-8.41' into maint
OTP-14574
* rickard/pcre-8.41:
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.c | 16 |
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; |