1--TEST--
2Testing null byte injection in imagewbmp
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7$support = gd_info();
8if (!isset($support['WBMP Support']) || $support['WBMP Support'] === false) {
9    print 'skip wbmp support not available';
10}
11?>
12--FILE--
13<?php
14$image = imagecreate(1,1);// 1px image
15try {
16    imagewbmp($image, "./foo\0bar");
17} catch (TypeError $e) {
18    echo $e->getMessage(), "\n";
19}
20?>
21--EXPECT--
22imagewbmp(): Argument #2 ($file) must not contain null bytes
23