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
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
And also fixed the bug: arguments are altered after some calls
- Loading branch information
Showing
4 changed files
with
173 additions
and
37 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,22 @@ | ||
| --TEST-- | ||
| Bug #66356 (Heap Overflow Vulnerability in imagecrop()) | ||
| --SKIPIF-- | ||
| <?php | ||
| if(!extension_loaded('gd')){ die('skip gd extension not available'); } | ||
| ?> | ||
| --FILE-- | ||
| <?php | ||
| $img = imagecreatetruecolor(10, 10); | ||
| $img = imagecrop($img, array("x" => "a", "y" => 0, "width" => 10, "height" => 10)); | ||
| $arr = array("x" => "a", "y" => "12b", "width" => 10, "height" => 10); | ||
| $img = imagecrop($img, $arr); | ||
| print_r($arr); | ||
| ?> | ||
| --EXPECTF-- | ||
| Array | ||
| ( | ||
| [x] => a | ||
| [y] => 12b | ||
| [width] => 10 | ||
| [height] => 10 | ||
| ) |
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