summaryrefslogtreecommitdiff
path: root/ext/gd/tests/bug71912.phpt
blob: ed4665f439a81720ddd35dd566a1bae4b8373a84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Bug #71912 (libgd: signedness vulnerability)
--SKIPIF--
<?php
        if(!extension_loaded('gd')){ die('skip gd extension not available'); }
        if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.0', '<')) {
            die("skip test requires GD 2.2.0 or higher");
        }
        if(!function_exists('imagecreatefromgd2')) die('skip imagecreatefromgd2() not available');
?>
--FILE--
<?php
imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . "invalid_neg_size.gd2");
?>
OK
--EXPECTF--
Warning: imagecreatefromgd2(): '%s%einvalid_neg_size.gd2' is not a valid GD2 file in %s%ebug71912.php on line %d
OK