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 #72696: imagefilltoborder stackoverflow on truecolor images
We must not allow negative color values be passed to gdImageFillToBorder(), because that can lead to infinite recursion since the recursion termination condition will not necessarily be met.
- Loading branch information
Showing
2 changed files
with
15 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,14 @@ | ||
| --TEST-- | ||
| Bug #72696 (imagefilltoborder stackoverflow on truecolor images) | ||
| --SKIPIF-- | ||
| <?php | ||
| if (!extension_loaded('gd')) die('skip gd extension not available'); | ||
| ?> | ||
| --FILE-- | ||
| <?php | ||
| $im = imagecreatetruecolor(10, 10); | ||
| imagefilltoborder($im, 0, 0, 1, -2); | ||
| ?> | ||
| ===DONE=== | ||
| --EXPECT-- | ||
| ===DONE=== |