php-src/ext/gd/tests/bug38212.phpt
Ilia Alshanetsky c5102f0733 Fixed a typo
2007-10-26 03:19:33 +00:00

19 lines
502 B
PHP

--TEST--
Bug #38212 (Seg Fault on invalid imagecreatefromgd2part() parameters)
--SKIPIF--
<?php
if (!function_exists('imagecopy')) die("skip gd extension not available\n");
?>
--FILE--
<?php
$file = dirname(__FILE__) . '/bug38212.gd2';
$im1 = imagecreatetruecolor(10,100);
imagefill($im1, 0,0, 0xffffff);
imagegd2($im1, $file);
$im = imagecreatefromgd2part($file, 0,0, -25,10);
unlink($file);
?>
--EXPECTF--
Warning: imagecreatefromgd2part(): Zero width or height not allowed in %s on line %d