mirror of
https://github.com/php/php-src.git
synced 2024-09-29 05:46:06 +00:00
22 lines
499 B
PHP
22 lines
499 B
PHP
--TEST--
|
|
Bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access, var 1
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('gd')) die("skip gd extension not available\n");
|
|
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
|
|
die("skip test requires GD 2.2.2 or higher");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$img = imagecreatetruecolor(100, 100);
|
|
imagecolortransparent($img, -1000000);
|
|
imagetruecolortopalette($img, TRUE, 3);
|
|
imagecolortransparent($img, 9);
|
|
|
|
?>
|
|
==DONE==
|
|
--EXPECT--
|
|
==DONE==
|