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