mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
a375d54785
Cf. PR #6787. Closes GH-6994.
19 lines
338 B
PHP
19 lines
338 B
PHP
--TEST--
|
|
Bug #72730: imagegammacorrect allows arbitrary write access
|
|
--EXTENSIONS--
|
|
gd
|
|
--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
|