1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 10:16:41 +02:00
Files
archived-php-src/ext/gd/tests/bug72697.phpt
T
Máté Kocsis 50765075db Improve some ValueError messages
Closes GH-5340
2020-04-06 10:41:01 +02:00

24 lines
528 B
PHP

--TEST--
Bug #72697: select_colors write out-of-bounds
--SKIPIF--
<?php
if (!function_exists("imagecreatetruecolor")) die("skip");
if (PHP_INT_MAX !== 9223372036854775807) die("skip for 64-bit long systems only");
?>
--FILE--
<?php
require __DIR__ . '/func.inc';
$img=imagecreatetruecolor(10, 10);
trycatch_dump(
fn() => imagetruecolortopalette($img, false, PHP_INT_MAX / 8)
);
?>
DONE
--EXPECT--
!! [ValueError] imagetruecolortopalette(): Argument #3 ($colorWanted) must be greater than 0 and less than 2147483647
DONE