bug72494.phpt 361 B

1234567891011121314151617
  1. --TEST--
  2. Bug #72494 (imagecropauto out-of-bounds access)
  3. --EXTENSIONS--
  4. gd
  5. --FILE--
  6. <?php
  7. require __DIR__ . '/func.inc';
  8. $im = imagecreate(10,10);
  9. trycatch_dump(
  10. fn() => imagecropauto($im, IMG_CROP_THRESHOLD, 0, 1337)
  11. );
  12. ?>
  13. --EXPECT--
  14. !! [ValueError] imagecropauto(): Argument #4 ($color) must be greater than or equal to 0 when using the threshold mode