1--TEST--
2Testing null byte injection in imagegif
3--SKIPIF--
4<?php
5if(!extension_loaded('gd')){ die('skip gd extension not available'); }
6?>
7--FILE--
8<?php
9$image = imagecreate(1,1);// 1px image
10try {
11    imagegif($image, "./foo\0bar");
12} catch (TypeError $e) {
13    echo $e->getMessage(), "\n";
14}
15?>
16--EXPECT--
17imagegif(): Argument #2 ($file) must not contain null bytes
18