bug73279.phpt 463 B

12345678910111213141516171819
  1. --TEST--
  2. Bug #73279 (Integer overflow in gdImageScaleBilinearPalette())
  3. --EXTENSIONS--
  4. gd
  5. --SKIPIF--
  6. <?php
  7. if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.4', '<')) {
  8. die('skip only for bundled libgd or external libgd >= 2.2.4');
  9. }
  10. ?>
  11. --FILE--
  12. <?php
  13. $src = imagecreate(100, 100);
  14. imagecolorallocate($src, 255, 255, 255);
  15. $dst = imagescale($src, 200, 200, IMG_BILINEAR_FIXED);
  16. printf("color: %x\n", imagecolorat($dst, 99, 99));
  17. ?>
  18. --EXPECT--
  19. color: ffffff