mirror of
https://github.com/php/php-src.git
synced 2024-12-24 09:18:17 +08:00
21 lines
358 B
PHP
21 lines
358 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] Gamma values must be positive
|