Quantifiers following (*VERB)s were not being diagnosed.

This commit is contained in:
Philip.Hazel 2016-11-25 10:37:23 +00:00
parent 6962217441
commit 7390ce13f6
4 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,8 @@ copied).
was set, unpredictable behaviour could occur. The underlying bug was
incorrect code and insufficient checking while searching for the end of
the called subroutine in the parsed pattern.
(m) Quantifiers following (*VERB)s were not being diagnosed as errors.
4. Back references are now permitted in lookbehind assertions when there are
no duplicated group numbers (that is, (?| has not been used), and, if the

View File

@ -2362,6 +2362,7 @@ while (ptr < ptrend)
case CHAR_RIGHT_PARENTHESIS:
inverbname = FALSE;
okquantifier = FALSE; /* Was probably set by literals */
/* This is the length in characters */
verbnamelength = (PCRE2_SIZE)(parsed_pattern - verblengthptr - 1);
/* But the limit on the length is in code units */

2
testdata/testinput2 vendored
View File

@ -4918,4 +4918,6 @@ a)"xI
/(?<=(?1))((?s))/anchored
/(*:ab)*/
# End of testinput2

View File

@ -15369,6 +15369,9 @@ Failed: error 128 at offset 2: assertion expected after (?( or (?(?C)
/(?<=(?1))((?s))/anchored
/(*:ab)*/
Failed: error 109 at offset 6: quantifier does not follow a repeatable item
# End of testinput2
Error -63: PCRE2_ERROR_BADDATA (unknown error number)
Error -62: bad serialized data