summaryrefslogtreecommitdiff
path: root/ext/gd/tests/libgd00101.phpt
blob: d2e278ced9888a98703ee2a4d0904393a26b358d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
libgd #101 (imagecreatefromgd can crash if gdImageCreate fails)
--SKIPIF--
<?php
	if (!extension_loaded('gd')) die("skip gd extension not available\n");
	if (!GD_BUNDLED) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
$im = imagecreatefromgd(__DIR__ . '/libgd00101.gd');
var_dump($im);
?>
--EXPECTF--
Warning: imagecreatefromgd(): Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
 in %slibgd00101.php on line %d

Warning: imagecreatefromgd(): "%slibgd00101.gd" is not a valid GD file in %slibgd00101.php on line %d
bool(false)