-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PHP-8.3: Fix GH-16184: UBSan address overflowed in ext/pcre/php_pcre.c
- Loading branch information
Showing
3 changed files
with
21 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--TEST-- | ||
GH-16184 (UBSan address overflowed in ext/pcre/php_pcre.c) | ||
--CREDITS-- | ||
YuanchengJiang | ||
--FILE-- | ||
<?php | ||
|
||
$string = 'This is a string. It contains numbers (0*9) as well as parentheses and some other things!'; | ||
echo preg_replace(array('/\b\w{1}s/', '/(\d{1})*(\d{1})/', '/[\(!\)]/'), array('test', '$1 to $2', '*'), $string), "\n"; | ||
|
||
?> | ||
--EXPECT-- | ||
This test a string. It contains numbers * to 0* to 9* test well test parentheses and some other things* |