[Pcre-svn] [608] code/trunk: Quantifiers following (*VERB)s …

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [608] code/trunk: Quantifiers following (*VERB)s were not being diagnosed.
Revision: 608
          http://www.exim.org/viewvc/pcre2?view=rev&revision=608
Author:   ph10
Date:     2016-11-25 10:37:23 +0000 (Fri, 25 Nov 2016)
Log Message:
-----------
Quantifiers following (*VERB)s were not being diagnosed.


Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/src/pcre2_compile.c
    code/trunk/testdata/testinput2
    code/trunk/testdata/testoutput2


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2016-11-24 15:57:34 UTC (rev 607)
+++ code/trunk/ChangeLog    2016-11-25 10:37:23 UTC (rev 608)
@@ -95,6 +95,8 @@
       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

Modified: code/trunk/src/pcre2_compile.c
===================================================================
--- code/trunk/src/pcre2_compile.c    2016-11-24 15:57:34 UTC (rev 607)
+++ code/trunk/src/pcre2_compile.c    2016-11-25 10:37:23 UTC (rev 608)
@@ -2362,6 +2362,7 @@


       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 */


Modified: code/trunk/testdata/testinput2
===================================================================
--- code/trunk/testdata/testinput2    2016-11-24 15:57:34 UTC (rev 607)
+++ code/trunk/testdata/testinput2    2016-11-25 10:37:23 UTC (rev 608)
@@ -4918,4 +4918,6 @@


/(?<=(?1))((?s))/anchored

+/(*:ab)*/
+
# End of testinput2

Modified: code/trunk/testdata/testoutput2
===================================================================
--- code/trunk/testdata/testoutput2    2016-11-24 15:57:34 UTC (rev 607)
+++ code/trunk/testdata/testoutput2    2016-11-25 10:37:23 UTC (rev 608)
@@ -15369,6 +15369,9 @@


/(?<=(?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