Skip to content

Commit f5a9e17

Browse files
committed
Increase the overly conservative pcre backtrack limit from 100000 to 1000000
1 parent 964f44a commit f5a9e17

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ext/pcre/php_pcre.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static PHP_GSHUTDOWN_FUNCTION(pcre) /* {{{ */
115115
/* }}} */
116116

117117
PHP_INI_BEGIN()
118-
STD_PHP_INI_ENTRY("pcre.backtrack_limit", "100000", PHP_INI_ALL, OnUpdateLong, backtrack_limit, zend_pcre_globals, pcre_globals)
118+
STD_PHP_INI_ENTRY("pcre.backtrack_limit", "1000000", PHP_INI_ALL, OnUpdateLong, backtrack_limit, zend_pcre_globals, pcre_globals)
119119
STD_PHP_INI_ENTRY("pcre.recursion_limit", "100000", PHP_INI_ALL, OnUpdateLong, recursion_limit, zend_pcre_globals, pcre_globals)
120120
PHP_INI_END()
121121

ext/standard/tests/general_functions/ini_get_all.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
ini_get_all() tests
33
--INI--
4-
pcre.backtrack_limit=100000
4+
pcre.backtrack_limit=1000000
55
pcre.recursion_limit=100000
66
--SKIPIF--
77
<?php if (!extension_loaded("reflection")) die("skip"); ?>
@@ -34,9 +34,9 @@ array(2) {
3434
["pcre.backtrack_limit"]=>
3535
array(3) {
3636
["global_value"]=>
37-
string(6) "100000"
37+
string(6) "1000000"
3838
["local_value"]=>
39-
string(6) "100000"
39+
string(6) "1000000"
4040
["access"]=>
4141
int(7)
4242
}
@@ -52,9 +52,9 @@ array(2) {
5252
}
5353
array(2) {
5454
["pcre.backtrack_limit"]=>
55-
string(6) "100000"
55+
string(6) "1000000"
5656
["pcre.recursion_limit"]=>
57-
string(6) "100000"
57+
string(6) "1000000"
5858
}
5959
array(0) {
6060
}

0 commit comments

Comments
 (0)