xref: /PHP-7.2/ext/gd/tests/bug77270.phpt (revision 0c350320)
1--TEST--
2Bug #77270 (imagecolormatch Out Of Bounds Write on Heap)
3--INI--
4memory_limit=-1
5--SKIPIF--
6<?php
7if (!extension_loaded('gd')) die('skip gd extension not available');
8if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.5', '<=')) die('skip upstream bugfix has not been released');
9?>
10--FILE--
11<?php
12$img1 = imagecreatetruecolor(0xfff, 0xfff);
13$img2 = imagecreate(0xfff, 0xfff);
14imagecolorallocate($img2, 0, 0, 0);
15imagesetpixel($img2, 0, 0, 255);
16imagecolormatch($img1, $img2);
17?>
18===DONE===
19--EXPECT--
20===DONE===
21