2018-12-30 20:59:26 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #77270 (imagecolormatch Out Of Bounds Write on Heap)
|
2019-01-07 04:30:44 +08:00
|
|
|
--INI--
|
|
|
|
memory_limit=-1
|
2021-05-17 04:51:09 +08:00
|
|
|
--EXTENSIONS--
|
|
|
|
gd
|
2018-12-30 20:59:26 +08:00
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
|
|
|
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.5', '<=')) die('skip upstream bugfix has not been released');
|
|
|
|
?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$img1 = imagecreatetruecolor(0xfff, 0xfff);
|
|
|
|
$img2 = imagecreate(0xfff, 0xfff);
|
|
|
|
imagecolorallocate($img2, 0, 0, 0);
|
|
|
|
imagesetpixel($img2, 0, 0, 255);
|
|
|
|
imagecolormatch($img1, $img2);
|
|
|
|
?>
|
|
|
|
===DONE===
|
|
|
|
--EXPECT--
|
|
|
|
===DONE===
|