xref: /PHP-7.2/ext/gd/tests/bug72512_1.phpt (revision 54293d21)
1--TEST--
2Bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access, var 1
3--SKIPIF--
4<?php
5	if (!extension_loaded('gd')) die("skip gd extension not available\n");
6	if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
7		die("skip test requires GD 2.2.2 or higher");
8	}
9?>
10--FILE--
11<?php
12
13$img = imagecreatetruecolor(100, 100);
14imagecolortransparent($img, -1000000);
15imagetruecolortopalette($img, TRUE, 3);
16imagecolortransparent($img, 9);
17
18?>
19==DONE==
20--EXPECT--
21==DONE==
22