bug77270.phpt 472 B

123456789101112131415161718192021
  1. --TEST--
  2. Bug #77270 (imagecolormatch Out Of Bounds Write on Heap)
  3. --INI--
  4. memory_limit=-1
  5. --EXTENSIONS--
  6. gd
  7. --SKIPIF--
  8. <?php
  9. if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.5', '<=')) die('skip upstream bugfix has not been released');
  10. ?>
  11. --FILE--
  12. <?php
  13. $img1 = imagecreatetruecolor(0xfff, 0xfff);
  14. $img2 = imagecreate(0xfff, 0xfff);
  15. imagecolorallocate($img2, 0, 0, 0);
  16. imagesetpixel($img2, 0, 0, 255);
  17. imagecolormatch($img1, $img2);
  18. ?>
  19. ===DONE===
  20. --EXPECT--
  21. ===DONE===