1--TEST-- 2Bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access, var 1 3--EXTENSIONS-- 4gd 5--SKIPIF-- 6<?php 7 if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) { 8 die("skip test requires GD 2.2.2 or higher"); 9 } 10?> 11--FILE-- 12<?php 13 14$img = imagecreatetruecolor(100, 100); 15imagecolortransparent($img, -1000000); 16imagetruecolortopalette($img, TRUE, 3); 17imagecolortransparent($img, 9); 18 19?> 20==DONE== 21--EXPECT-- 22==DONE== 23