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