xref: /PHP-8.2/ext/gd/tests/bug73869.phpt (revision 0aaad46c)
1--TEST--
2Bug #73869 (Signed Integer Overflow gd_io.c)
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7    if (!GD_BUNDLED && version_compare(GD_VERSION, '2.3.3', '>=')) {
8        die("skip test requires GD 2.3.2 or older");
9    }
10?>
11--FILE--
12<?php
13var_dump(imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . 'bug73869a.gd2'));
14var_dump(imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . 'bug73869b.gd2'));
15?>
16--EXPECTF--
17Warning: imagecreatefromgd2(): "%s" is not a valid GD2 file in %s on line %d
18bool(false)
19
20Warning: imagecreatefromgd2(): "%s" is not a valid GD2 file in %s on line %d
21bool(false)
22