Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Bug #79877 (getimagesize function silently truncates after a null byte) --FILE-- ..
Decoded Output download
--TEST--
Bug #79877 (getimagesize function silently truncates after a null byte)
--FILE--
<?php
var_dump(getimagesize("/tmp/a.pngxx"));
?>
--EXPECTF--
Fatal error: Uncaught ValueError: getimagesize(): Argument #1 ($filename) must not contain any null bytes in %s:%d
Stack trace:
#0 %s(%d): getimagesize('/tmp/a.pngxx')
#1 {main}
thrown in %s on line %d
Did this file decode correctly?
Original Code
--TEST--
Bug #79877 (getimagesize function silently truncates after a null byte)
--FILE--
<?php
var_dump(getimagesize("/tmp/a.png\0xx"));
?>
--EXPECTF--
Fatal error: Uncaught ValueError: getimagesize(): Argument #1 ($filename) must not contain any null bytes in %s:%d
Stack trace:
#0 %s(%d): getimagesize('/tmp/a.png\x00xx')
#1 {main}
thrown in %s on line %d
Function Calls
getimagesize | 1 |
Stats
MD5 | e9c332b50794b1ea4b9ce076ad376c70 |
Eval Count | 0 |
Decode Time | 78 ms |