xref: /PHP-5.6/ext/gd/tests/bug38212.phpt (revision c5102f07)
1--TEST--
2Bug #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);
11imagefill($im1, 0,0, 0xffffff);
12imagegd2($im1, $file);
13$im = imagecreatefromgd2part($file, 0,0, -25,10);
14unlink($file);
15?>
16--EXPECTF--
17
18Warning: imagecreatefromgd2part(): Zero width or height not allowed in %s on line %d
19