xref: /PHP-8.4/ext/gd/tests/bug73869.phpt (revision 6727f548)
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--
17%A
18Warning: imagecreatefromgd2(): "%s" is not a valid GD2 file in %s on line %d
19bool(false)
20
21%A
22Warning: imagecreatefromgd2(): "%s" is not a valid GD2 file in %s on line %d
23bool(false)
24