mirror of
https://github.com/php/php-src.git
synced 2024-10-01 14:56:10 +00:00
24 lines
424 B
PHP
24 lines
424 B
PHP
--TEST--
|
|
Bug #39863 (file_exists() silently truncates after a null byte)
|
|
--CREDITS--
|
|
Andrew van der Stock, vanderaj @ owasp.org
|
|
--FILE--
|
|
<?php
|
|
|
|
$filename = __FILE__ . chr(0). ".ridiculous";
|
|
|
|
if (file_exists($filename)) {
|
|
echo "FAIL\n";
|
|
}
|
|
else {
|
|
echo "PASS\n";
|
|
}
|
|
?>
|
|
===DONE===
|
|
<?php exit(0); ?>
|
|
--EXPECTF--
|
|
Warning: file_exists() expects parameter 1 to be a valid path, string given in %s on line %d
|
|
PASS
|
|
===DONE===
|
|
|