diff options
author | Andi Gutmans <andi@php.net> | 2000-06-15 18:36:46 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2000-06-15 18:36:46 +0000 |
commit | 7d5cfd3766e6fa33c4f1cbe489dc896fca23823e (patch) | |
tree | fa40e646b4b85432c61b3f5e7bdb70393af3fde5 /main/php_virtual_cwd.c | |
parent | 3ad9d629490d20336e12ff6dda39b90b03cf0bcf (diff) | |
download | php-git-7d5cfd3766e6fa33c4f1cbe489dc896fca23823e.tar.gz |
- virtual_fopen() should fail on empty path
Diffstat (limited to 'main/php_virtual_cwd.c')
-rw-r--r-- | main/php_virtual_cwd.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |