-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of pcre overflow expressions
Summary: Couple of fixes to the handling of pcre compiled expressions that overflow the default pcre cache: s_pcre_globals should smart-free m_overflow at the end of the request, and should free() the set of overflow expressions themselves. Reviewed By: @markw65 Differential Revision: D1503955
- Loading branch information
Showing
7 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
$matches = 1; | ||
for ($i=1 ; $i < 1050 ; $i++) { | ||
$db_name = 'dbs.'.rand(); | ||
|
||
if (preg_match("/^dbs\.(\d+)$/", $db_name, $match)) { | ||
$db_num = $match[1]; | ||
$printable_db_name = preg_replace('/' .$db_num.'/', '%d', $db_name); | ||
if (!$printable_db_name) { | ||
var_dump("preg_replace returned false"); | ||
break; | ||
} | ||
++$matches; | ||
} | ||
} | ||
var_dump(sprintf("%d matches", $matches)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
string(14) "100000 matches" | ||
string(14) "100000 matches" | ||
string(14) "100000 matches" | ||
string(14) "100000 matches" | ||
string(14) "100000 matches" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-vEval.PCRETableSize=128 --count 5 |