xref: /PHP-8.2/ext/gd/tests/bug72482_2.phpt (revision a375d547)
1--TEST--
2Bug 72482 (Ilegal write/read access caused by gdImageAALine overflow)
3--EXTENSIONS--
4gd
5--FILE--
6<?php
7require_once __DIR__ . DIRECTORY_SEPARATOR . 'func.inc';
8
9$im = imagecreatetruecolor(10, 10);
10imagefilledrectangle($im, 0, 0, 9, 9, imagecolorallocate($im, 255, 255, 255));
11imageantialias($im, true);
12imageline($im, 0, 0, 10, 10, imagecolorallocate($im, 0, 0, 0));
13
14test_image_equals_file(__DIR__ . DIRECTORY_SEPARATOR . 'bug72482_2.png', $im);
15?>
16--EXPECT--
17The images are equal.
18