mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
a375d54785
Cf. PR #6787. Closes GH-6994.
22 lines
472 B
PHP
22 lines
472 B
PHP
--TEST--
|
|
Bug #77270 (imagecolormatch Out Of Bounds Write on Heap)
|
|
--INI--
|
|
memory_limit=-1
|
|
--EXTENSIONS--
|
|
gd
|
|
--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===
|