1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00
Files
archived-php-src/ext/gd/tests/imagexbm_nullbyte_injection.phpt
T
2020-03-31 16:55:36 +02:00

18 lines
387 B
PHP

--TEST--
Testing null byte injection in imagexbm
--SKIPIF--
<?php
if(!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$image = imagecreate(1,1);// 1px image
try {
imagexbm($image, "./foo\0bar");
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECTF--
imagexbm(): Argument #2 ($filename) must be a valid path or null, string given