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