mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
a375d54785
Cf. PR #6787. Closes GH-6994.
16 lines
300 B
PHP
16 lines
300 B
PHP
--TEST--
|
|
Testing null byte injection in imagegd2
|
|
--EXTENSIONS--
|
|
gd
|
|
--FILE--
|
|
<?php
|
|
$image = imagecreate(1,1);// 1px image
|
|
try {
|
|
imagegd($image, "./foo\0bar");
|
|
} catch (ValueError $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
imagegd(): Argument #2 ($file) must not contain any null bytes
|