bug72512_1.phpt 457 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access, var 1
  3. --EXTENSIONS--
  4. gd
  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. $img = imagecreatetruecolor(100, 100);
  14. imagecolortransparent($img, -1000000);
  15. imagetruecolortopalette($img, TRUE, 3);
  16. imagecolortransparent($img, 9);
  17. ?>
  18. ==DONE==
  19. --EXPECT--
  20. ==DONE==