bug77479.phpt 572 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Bug #77479 (imagewbmp() segfaults with very large image)
  3. --EXTENSIONS--
  4. gd
  5. --SKIPIF--
  6. <?php
  7. if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
  8. ?>
  9. --INI--
  10. memory_limit=-1
  11. --FILE--
  12. <?php
  13. $im = imagecreate(40000, 20000);
  14. imagecolorallocate($im, 0, 0, 0);
  15. imagewbmp($im, __DIR__ . '/77479.wbmp');
  16. ?>
  17. --EXPECTF--
  18. Warning: imagewbmp():%S Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
  19. in %s on line %d
  20. Warning: imagewbmp(): Could not create WBMP in %s on line %d
  21. --CLEAN--
  22. <?php
  23. @unlink(__DIR__ . '/77479.wbmp');
  24. ?>