blob: bbc01eb68baa6fd7764d4e043bd95dea5fb59f07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--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 ($input_gamma) must be greater than 0
|