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

21 lines
398 B
PHP

--TEST--
Bug #72730: imagegammacorrect allows arbitrary write access
--SKIPIF--
<?php
if (!function_exists("imagecreatetruecolor")) die("skip");
?>
--FILE--
<?php
require __DIR__ . '/func.inc';
$img = imagecreatetruecolor(1, 1);
trycatch_dump(
fn() => imagegammacorrect($img, -1, 1337)
);
?>
--EXPECT--
!! [ValueError] imagegammacorrect(): Argument #2 ($inputgamma) must be greater than 0