1--TEST--
2Testing null byte injection in imagexbm
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    imagexbm($image, "./foo\0bar");
12} catch (ValueError $e) {
13    echo $e->getMessage(), "\n";
14}
15?>
16--EXPECT--
17imagexbm(): Argument #2 ($filename) must not contain any null bytes
18