-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix use after free because of data clobbering by user error handler
Fixes oss-fuzz #41692
- Loading branch information
Showing
5 changed files
with
561 additions
and
196 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Autovivification of false to array with data clobbering by error handler | ||
--FILE-- | ||
<?php | ||
set_error_handler(function($code, $msg) { | ||
echo "Err: $msg\n"; | ||
$GLOBALS['a']=''; | ||
}); | ||
$a=[!'a']; | ||
$a[0][$d]='b'; | ||
var_dump($a); | ||
?> | ||
--EXPECT-- | ||
Err: Automatic conversion of false to array is deprecated | ||
string(0) "" |
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
Oops, something went wrong.