From 01ad5f9b94191b3341c5a3154828af4b613be8d2 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 27 Feb 2003 16:41:44 +0000 Subject: [PATCH] MFH --- ext/standard/filestat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index ab047ff554..86bb455f76 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; } -- 2.40.0