diff options
Diffstat (limited to 'ext/standard/tests/file/bug39863.phpt')
-rw-r--r-- | ext/standard/tests/file/bug39863.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/standard/tests/file/bug39863.phpt b/ext/standard/tests/file/bug39863.phpt new file mode 100644 index 000000000..520a46412 --- /dev/null +++ b/ext/standard/tests/file/bug39863.phpt @@ -0,0 +1,24 @@ +--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); ?> +--XFAIL-- +Needs bug #39863 fixed +--EXPECT-- +PASS +===DONE=== + |