imagexbm_nullbyte_injection.phpt 306 B

123456789101112131415
  1. --TEST--
  2. Testing null byte injection in imagexbm
  3. --EXTENSIONS--
  4. gd
  5. --FILE--
  6. <?php
  7. $image = imagecreate(1,1);// 1px image
  8. try {
  9. imagexbm($image, "./foo\0bar");
  10. } catch (ValueError $e) {
  11. echo $e->getMessage(), "\n";
  12. }
  13. ?>
  14. --EXPECT--
  15. imagexbm(): Argument #2 ($filename) must not contain any null bytes