1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Files
archived-php-src/ext/gd/tests/bug77479.phpt
T
Christoph M. Becker a375d54785 Migrate skip checks to --EXTENSIONS-- for ext/gd
Cf. PR #6787.

Closes GH-6994.
2021-05-22 15:38:51 +02:00

26 lines
572 B
PHP

--TEST--
Bug #77479 (imagewbmp() segfaults with very large image)
--EXTENSIONS--
gd
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
?>
--INI--
memory_limit=-1
--FILE--
<?php
$im = imagecreate(40000, 20000);
imagecolorallocate($im, 0, 0, 0);
imagewbmp($im, __DIR__ . '/77479.wbmp');
?>
--EXPECTF--
Warning: imagewbmp():%S Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
in %s on line %d
Warning: imagewbmp(): Could not create WBMP in %s on line %d
--CLEAN--
<?php
@unlink(__DIR__ . '/77479.wbmp');
?>