Annotation of embedaddon/php/ext/gd/tests/bug38212.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #38212 (Seg Fault on invalid imagecreatefromgd2part() parameters)
! 3: --SKIPIF--
! 4: <?php
! 5: if (!function_exists('imagecopy')) die("skip gd extension not available\n");
! 6: ?>
! 7: --FILE--
! 8: <?php
! 9: $file = dirname(__FILE__) . '/bug38212.gd2';
! 10: $im1 = imagecreatetruecolor(10,100);
! 11: imagefill($im1, 0,0, 0xffffff);
! 12: imagegd2($im1, $file);
! 13: $im = imagecreatefromgd2part($file, 0,0, -25,10);
! 14: unlink($file);
! 15: ?>
! 16: --EXPECTF--
! 17:
! 18: Warning: imagecreatefromgd2part(): Zero width or height not allowed in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>