summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-02-27 16:41:23 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-02-27 16:41:23 +0000
commit560e33968de93250377606782949f5004affca83 (patch)
tree4224161ce21a90e9f1d7ffc342e249607f17e50e
parent4cac01352d4357bf3166cf0357c5683fe2acae95 (diff)
downloadphp-git-560e33968de93250377606782949f5004affca83.tar.gz
Fixed bug #21410 (fixed handling of NULL or "" files on Win32)
-rw-r--r--ext/standard/filestat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index f7ab3af0d3..8321ceb41a 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -564,6 +564,10 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ
char *stat_sb_names[13]={"dev", "ino", "mode", "nlink", "uid", "gid", "rdev",
"size", "atime", "mtime", "ctime", "blksize", "blocks"};
+ if (!filename_length) {
+ RETURN_FALSE;
+ }
+
if (PG(safe_mode) &&(!php_checkuid_ex(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR, IS_EXISTS_CHECK(type) ? CHECKUID_NO_ERRORS : 0))) {
RETURN_FALSE;
}