xref: /PHP-8.1/ext/gd/tests/libgd00101.phpt (revision a375d547)
1--TEST--
2libgd #101 (imagecreatefromgd can crash if gdImageCreate fails)
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7    if (!GD_BUNDLED) die("skip requires bundled GD library\n");
8?>
9--FILE--
10<?php
11$im = imagecreatefromgd(__DIR__ . '/libgd00101.gd');
12var_dump($im);
13?>
14--EXPECTF--
15Warning: imagecreatefromgd(): Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
16 in %slibgd00101.php on line %d
17
18Warning: imagecreatefromgd(): "%slibgd00101.gd" is not a valid GD file in %slibgd00101.php on line %d
19bool(false)
20