rasmus                                   Sat, 21 May 2011 19:48:37 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=311323

Log:
Increase the overly conservative pcre backtrack limit from 100000 to 1000000

Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.c
    U   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/ini_get_all.phpt
    U   php/php-src/branches/PHP_5_4/ext/pcre/php_pcre.c
    U   
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/ini_get_all.phpt
    U   php/php-src/trunk/ext/pcre/php_pcre.c
    U   php/php-src/trunk/ext/standard/tests/general_functions/ini_get_all.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2011-05-21 18:29:44 UTC (rev 311322)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-05-21 19:48:37 UTC (rev 311323)
@@ -3,6 +3,7 @@
 ?? ??? 2011, PHP 5.3.7
 - Upgraded bundled SQLite to version 3.7.6.2. (Scott)
 - Upgraded bundled PCRE to version 8.12. (Scott)
+- Increased the backtrack limit from 100000 to 1000000 (Rasmus)

 - Zend Engine:
   . Fixed bug #54804 (__halt_compiler and imported namespaces).

Modified: php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.c    2011-05-21 18:29:44 UTC 
(rev 311322)
+++ php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.c    2011-05-21 19:48:37 UTC 
(rev 311323)
@@ -115,7 +115,7 @@
 /* }}} */

 PHP_INI_BEGIN()
-       STD_PHP_INI_ENTRY("pcre.backtrack_limit", "100000", PHP_INI_ALL, 
OnUpdateLong, backtrack_limit, zend_pcre_globals, pcre_globals)
+       STD_PHP_INI_ENTRY("pcre.backtrack_limit", "1000000", PHP_INI_ALL, 
OnUpdateLong, backtrack_limit, zend_pcre_globals, pcre_globals)
        STD_PHP_INI_ENTRY("pcre.recursion_limit", "100000", PHP_INI_ALL, 
OnUpdateLong, recursion_limit, zend_pcre_globals, pcre_globals)
 PHP_INI_END()


Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/ini_get_all.phpt
===================================================================
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/ini_get_all.phpt
  2011-05-21 18:29:44 UTC (rev 311322)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/ini_get_all.phpt
  2011-05-21 19:48:37 UTC (rev 311323)
@@ -1,7 +1,7 @@
 --TEST--
 ini_get_all() tests
 --INI--
-pcre.backtrack_limit=100000
+pcre.backtrack_limit=1000000
 pcre.recursion_limit=100000
 --SKIPIF--
 <?php if (!extension_loaded("reflection")) die("skip"); ?>
@@ -34,9 +34,9 @@
   ["pcre.backtrack_limit"]=>
   array(3) {
     ["global_value"]=>
-    string(6) "100000"
+    string(6) "1000000"
     ["local_value"]=>
-    string(6) "100000"
+    string(6) "1000000"
     ["access"]=>
     int(7)
   }
@@ -52,7 +52,7 @@
 }
 array(2) {
   ["pcre.backtrack_limit"]=>
-  string(6) "100000"
+  string(6) "1000000"
   ["pcre.recursion_limit"]=>
   string(6) "100000"
 }

Modified: php/php-src/branches/PHP_5_4/ext/pcre/php_pcre.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/pcre/php_pcre.c    2011-05-21 18:29:44 UTC 
(rev 311322)
+++ php/php-src/branches/PHP_5_4/ext/pcre/php_pcre.c    2011-05-21 19:48:37 UTC 
(rev 311323)
@@ -115,7 +115,7 @@
 /* }}} */

 PHP_INI_BEGIN()
-       STD_PHP_INI_ENTRY("pcre.backtrack_limit", "100000", PHP_INI_ALL, 
OnUpdateLong, backtrack_limit, zend_pcre_globals, pcre_globals)
+       STD_PHP_INI_ENTRY("pcre.backtrack_limit", "1000000", PHP_INI_ALL, 
OnUpdateLong, backtrack_limit, zend_pcre_globals, pcre_globals)
        STD_PHP_INI_ENTRY("pcre.recursion_limit", "100000", PHP_INI_ALL, 
OnUpdateLong, recursion_limit, zend_pcre_globals, pcre_globals)
 PHP_INI_END()


Modified: 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/ini_get_all.phpt
===================================================================
--- 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/ini_get_all.phpt
  2011-05-21 18:29:44 UTC (rev 311322)
+++ 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/ini_get_all.phpt
  2011-05-21 19:48:37 UTC (rev 311323)
@@ -1,7 +1,7 @@
 --TEST--
 ini_get_all() tests
 --INI--
-pcre.backtrack_limit=100000
+pcre.backtrack_limit=1000000
 pcre.recursion_limit=100000
 --SKIPIF--
 <?php if (!extension_loaded("reflection")) die("skip"); ?>
@@ -34,9 +34,9 @@
   ["pcre.backtrack_limit"]=>
   array(3) {
     ["global_value"]=>
-    string(6) "100000"
+    string(6) "1000000"
     ["local_value"]=>
-    string(6) "100000"
+    string(6) "1000000"
     ["access"]=>
     int(7)
   }
@@ -52,9 +52,9 @@
 }
 array(2) {
   ["pcre.backtrack_limit"]=>
-  string(6) "100000"
+  string(6) "1000000"
   ["pcre.recursion_limit"]=>
-  string(6) "100000"
+  string(6) "1000000"
 }
 array(0) {
 }

Modified: php/php-src/trunk/ext/pcre/php_pcre.c
===================================================================
--- php/php-src/trunk/ext/pcre/php_pcre.c       2011-05-21 18:29:44 UTC (rev 
311322)
+++ php/php-src/trunk/ext/pcre/php_pcre.c       2011-05-21 19:48:37 UTC (rev 
311323)
@@ -115,7 +115,7 @@
 /* }}} */

 PHP_INI_BEGIN()
-       STD_PHP_INI_ENTRY("pcre.backtrack_limit", "100000", PHP_INI_ALL, 
OnUpdateLong, backtrack_limit, zend_pcre_globals, pcre_globals)
+       STD_PHP_INI_ENTRY("pcre.backtrack_limit", "1000000", PHP_INI_ALL, 
OnUpdateLong, backtrack_limit, zend_pcre_globals, pcre_globals)
        STD_PHP_INI_ENTRY("pcre.recursion_limit", "100000", PHP_INI_ALL, 
OnUpdateLong, recursion_limit, zend_pcre_globals, pcre_globals)
 PHP_INI_END()


Modified: 
php/php-src/trunk/ext/standard/tests/general_functions/ini_get_all.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/general_functions/ini_get_all.phpt     
2011-05-21 18:29:44 UTC (rev 311322)
+++ php/php-src/trunk/ext/standard/tests/general_functions/ini_get_all.phpt     
2011-05-21 19:48:37 UTC (rev 311323)
@@ -1,7 +1,7 @@
 --TEST--
 ini_get_all() tests
 --INI--
-pcre.backtrack_limit=100000
+pcre.backtrack_limit=1000000
 pcre.recursion_limit=100000
 --SKIPIF--
 <?php if (!extension_loaded("reflection")) die("skip"); ?>
@@ -34,9 +34,9 @@
   ["pcre.backtrack_limit"]=>
   array(3) {
     ["global_value"]=>
-    string(6) "100000"
+    string(6) "1000000"
     ["local_value"]=>
-    string(6) "100000"
+    string(6) "1000000"
     ["access"]=>
     int(7)
   }
@@ -52,7 +52,7 @@
 }
 array(2) {
   ["pcre.backtrack_limit"]=>
-  string(6) "100000"
+  string(6) "1000000"
   ["pcre.recursion_limit"]=>
   string(6) "100000"
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to