Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix buffer overflow in mb_ereg_replace
Summary: This diff has already been landed to release and to open-source branches. We're now landing it on master. CVE-2019-11935 Reviewed By: jjergus Differential Revision: D18177934 fbshipit-source-id: d108a59e38c67f5f5e835febd7255307605ba62c
- Loading branch information
1 parent
8b41a38
commit 1c51855
Showing
3 changed files
with
22 additions
and
3 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
7 changes: 7 additions & 0 deletions
7
hphp/test/zend/good/ext/mbstring/mb_ereg_replace_invalid_replacement.php
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,7 @@ | ||
| <?hh | ||
|
|
||
| <<__EntryPoint>> | ||
| function main(): void { | ||
| var_dump(mb_ereg_replace("", "\xf1", "", "")); | ||
| throw new Error("done"); | ||
| } |
7 changes: 7 additions & 0 deletions
7
hphp/test/zend/good/ext/mbstring/mb_ereg_replace_invalid_replacement.php.expectf
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,7 @@ | ||
| Warning: Replacement ends with unterminated UTF-8: 0xf1 in %s/mb_ereg_replace_invalid_replacement.php on line 5 | ||
| string(0) "" | ||
|
|
||
| Fatal error: Uncaught Error: done in %s/mb_ereg_replace_invalid_replacement.php:6 | ||
| Stack trace: | ||
| #0 (): main() | ||
| #1 {main} |