forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #72512, invalid read or write for palette image when invalid tran…
…sparent index is used Conflicts: ext/gd/libgd/gd.c
- Loading branch information
1 parent
33c1a55
commit 928aecc
Showing
3 changed files
with
26 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
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,17 @@ | ||
--TEST-- | ||
Bug #19366 (gdimagefill() function crashes (fixed in bundled libgd)) | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('gd')) die("skip gd extension not available\n"); | ||
?> | ||
--FILE-- | ||
<?php | ||
$img = imagecreatetruecolor(100, 100); | ||
imagecolortransparent($img, -1000000); | ||
imagetruecolortopalette($img, TRUE, 3); | ||
imagecolortransparent($img, 9); | ||
echo "OK"; | ||
?> | ||
--EXPECT-- | ||
OK | ||
|