xref: /PHP-8.0/ext/gd/tests/bug73868.phpt (revision 4e6fbb0a)
1--TEST--
2Bug 73868 (DOS vulnerability in gdImageCreateFromGd2Ctx())
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) die('skip gd extension not available');
6?>
7--FILE--
8<?php
9var_dump(imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . 'bug73868.gd2'));
10?>
11--EXPECTF--
12Warning: imagecreatefromgd2(): gd2: EOF while reading
13 in %s on line %d
14
15Warning: imagecreatefromgd2(): "%s" is not a valid GD2 file in %s on line %d
16bool(false)
17