From 7d5cfd3766e6fa33c4f1cbe489dc896fca23823e Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Thu, 15 Jun 2000 18:36:46 +0000 Subject: [PATCH] - virtual_fopen() should fail on empty path --- main/php_virtual_cwd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/php_virtual_cwd.c b/main/php_virtual_cwd.c index 2cb37d8ff5..efa4c965d7 100644 --- a/main/php_virtual_cwd.c +++ b/main/php_virtual_cwd.c @@ -411,6 +411,10 @@ CWD_API FILE *virtual_fopen(const char *path, const char *mode) FILE *f; CWDLS_FETCH(); + if (path[0] == '\0') { /* Fail to open empty path */ + return NULL; + } + CWD_STATE_COPY(&new_state, &CWDG(cwd)); virtual_file_ex(&new_state, path, NULL); -- 2.40.0