bug71912.phpt 556 B

12345678910111213141516171819
  1. --TEST--
  2. Bug #71912 (libgd: signedness vulnerability)
  3. --EXTENSIONS--
  4. gd
  5. --SKIPIF--
  6. <?php
  7. if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.0', '<')) {
  8. die("skip test requires GD 2.2.0 or higher");
  9. }
  10. if(!function_exists('imagecreatefromgd2')) die('skip imagecreatefromgd2() not available');
  11. ?>
  12. --FILE--
  13. <?php
  14. imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . "invalid_neg_size.gd2");
  15. ?>
  16. OK
  17. --EXPECTF--
  18. Warning: imagecreatefromgd2(): "%s%einvalid_neg_size.gd2" is not a valid GD2 file in %s%ebug71912.php on line %d
  19. OK