summaryrefslogtreecommitdiff
path: root/ext/gd/tests/imagegd2_nullbyte_injection.phpt
blob: 2fc3050421194be444b6720068ed7068458ae3ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--TEST--
Testing null byte injection in imagegd2
--SKIPIF--
<?php
        if(!extension_loaded('gd')){ die('skip gd extension not available'); }
?>
--FILE--
<?php
$image = imagecreate(1,1);// 1px image
var_dump(imagegd2($image, "./foo\0bar"));
?>
--EXPECTF--
Warning: imagegd2() expects parameter 2 to be a valid path, string given in %s on line %d
NULL