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
ext_mbstring: Fix invalid free() in php_mb_parse_encoding
Summary: A chunk of memory allocated by 'req::calloc_noptrs' was being freed by 'free'. The former internally calls 'calloc' and returns a pointer at an index sizeof(MallocNode) inside the allocated buffer. This led to freeing invalid memory. CVE-2019-11930 Reviewed By: jjergus Differential Revision: D18179908 fbshipit-source-id: 0e3fe77628e0b9dee8361e712b8abac59ae5ed22
- Loading branch information
1 parent
a7f1fd5
commit 524d2e6
Showing
3 changed files
with
9 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <?hh | ||
| // Copyright 2004-present Facebook. All Rights Reserved. | ||
|
|
||
| <<__EntryPoint>> | ||
| function main() { | ||
| var_dump(mb_detect_order("UTF-8,\x2c")); | ||
| } |
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 @@ | ||
| bool(false) |