Revert "Apply upstream revision 489 (Closes: #815920)"
authorMatthew Vernon <matthew@debian.org>
Tue, 2 Aug 2016 17:56:54 +0000 (18:56 +0100)
committerMatthew Vernon <matthew@debian.org>
Tue, 2 Aug 2016 17:56:54 +0000 (18:56 +0100)
This reverts commit 6e2f9220620fa8f0f3a3ef62d940b9fcd4cedea3.

We do this as the new upstream version has fixed the bug this fixes.

src/pcre2_compile.c
testdata/testinput8
testdata/testoutput8-16-2
testdata/testoutput8-16-3
testdata/testoutput8-32-2
testdata/testoutput8-32-3
testdata/testoutput8-32-4
testdata/testoutput8-8-2
testdata/testoutput8-8-3
testdata/testoutput8-8-4

index 4010d17921c65076f1decb9a696360e3f1282de7..d8528378e7974b86918ca19cfb020f6f7f9f471a 100644 (file)
@@ -5899,22 +5899,10 @@ for (;; ptr++)
               goto FAILED;
               }
             cb->had_accept = TRUE;
-            
-            /* In the first pass, just accumulate the length required;
-            otherwise hitting (*ACCEPT) inside many nested parentheses can
-            cause workspace overflow. */
-              
             for (oc = cb->open_caps; oc != NULL; oc = oc->next)
               {
-              if (lengthptr != NULL)
-                {
-                *lengthptr += CU2BYTES(1) + IMM2_SIZE; 
-                }
-              else
-                {       
-                *code++ = OP_CLOSE;
-                PUT2INC(code, 0, oc->number);
-                } 
+              *code++ = OP_CLOSE;
+              PUT2INC(code, 0, oc->number);
               }
             setverb = *code++ =
               (cb->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;
index 7e2a1f0be6411455bdb5cddf169ae0e5bdfd5110..ca3b1b98aa6e4dc9faf19ccba45c95cc3e98c40d 100644 (file)
 
 /((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug
 
-/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
-
 # End of testinput8
index a5e8dec23ffe25475eaaff3d55022563172125a3..05669bbeb1cceeb207ffe3bdad88ce1076c92384 100644 (file)
@@ -1027,7 +1027,4 @@ Capturing subpattern count = 10
 May match empty string
 Subject length lower bound = 0
 
-/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
-Failed: error 186 at offset 490: regular expression is too complicated
-
 # End of testinput8
index 36133b379a144bfea1a3818da74bc652c577211f..31884e14a68a0cd72caae1b76a2affa81a29554d 100644 (file)
@@ -1023,7 +1023,4 @@ Capturing subpattern count = 10
 May match empty string
 Subject length lower bound = 0
 
-/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
-Failed: error 114 at offset 509: missing closing parenthesis
-
 # End of testinput8
index 99c4fad71d1ad60323e3d2c20cb7369bed76de6c..babd0c70f709912ea0bfdf9a981d32b46a0811aa 100644 (file)
@@ -1023,7 +1023,4 @@ Capturing subpattern count = 10
 May match empty string
 Subject length lower bound = 0
 
-/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
-Failed: error 114 at offset 509: missing closing parenthesis
-
 # End of testinput8
index 99c4fad71d1ad60323e3d2c20cb7369bed76de6c..babd0c70f709912ea0bfdf9a981d32b46a0811aa 100644 (file)
@@ -1023,7 +1023,4 @@ Capturing subpattern count = 10
 May match empty string
 Subject length lower bound = 0
 
-/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
-Failed: error 114 at offset 509: missing closing parenthesis
-
 # End of testinput8
index 99c4fad71d1ad60323e3d2c20cb7369bed76de6c..babd0c70f709912ea0bfdf9a981d32b46a0811aa 100644 (file)
@@ -1023,7 +1023,4 @@ Capturing subpattern count = 10
 May match empty string
 Subject length lower bound = 0
 
-/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
-Failed: error 114 at offset 509: missing closing parenthesis
-
 # End of testinput8
index 6dc1f421aff8a463bedd85d148638a1d134b1197..6a9aa0a760f0ed8f9b91c732c9e77fe3b315ffa0 100644 (file)
@@ -1026,7 +1026,4 @@ Capturing subpattern count = 10
 May match empty string
 Subject length lower bound = 0
 
-/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
-Failed: error 114 at offset 509: missing closing parenthesis
-
 # End of testinput8
index ae14946a84259b883dc43ca98c5b3c7ab4f411e1..2fe116822ed1b16db157c94f3b430b05b8610a4e 100644 (file)
@@ -1024,7 +1024,4 @@ Capturing subpattern count = 10
 May match empty string
 Subject length lower bound = 0
 
-/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
-Failed: error 114 at offset 509: missing closing parenthesis
-
 # End of testinput8
index 6c799565a457e28db1211b7a6a68f047cf833e87..91993b2409607d48dc8de587cc5522fc7570fc11 100644 (file)
@@ -1022,7 +1022,4 @@ Capturing subpattern count = 10
 May match empty string
 Subject length lower bound = 0
 
-/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
-Failed: error 114 at offset 509: missing closing parenthesis
-
 # End of testinput8