xref: /php-src/ext/gd/tests/bug72482_2.phpt (revision 0b8466f2)
1--TEST--
2Bug 72482 (Ilegal write/read access caused by gdImageAALine overflow)
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7if (!(imagetypes() & IMG_PNG)) {
8    die("skip No PNG support");
9}
10?>
11--FILE--
12<?php
13require_once __DIR__ . DIRECTORY_SEPARATOR . 'func.inc';
14
15$im = imagecreatetruecolor(10, 10);
16imagefilledrectangle($im, 0, 0, 9, 9, imagecolorallocate($im, 255, 255, 255));
17imageantialias($im, true);
18imageline($im, 0, 0, 10, 10, imagecolorallocate($im, 0, 0, 0));
19
20test_image_equals_file(__DIR__ . DIRECTORY_SEPARATOR . 'bug72482_2.png', $im);
21?>
22--EXPECT--
23The images are equal.
24