diff options
| author | Antony Dovgal <tony2001@php.net> | 2006-11-22 11:55:36 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2006-11-22 11:55:36 +0000 |
| commit | a7ce772222dc2e6b7bbdf3113d76852b2eeef603 (patch) | |
| tree | dfad0d138873692f752f8c84d79cd601ddeec779 /main/safe_mode.c | |
| parent | a09ef37d30b9d1d753151c810b2f11a91145117a (diff) | |
| download | php-git-a7ce772222dc2e6b7bbdf3113d76852b2eeef603.tar.gz | |
fix #39575 (move_uploaded_file() no longer working (safe mode related))
Diffstat (limited to 'main/safe_mode.c')
| -rw-r--r-- | main/safe_mode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/safe_mode.c b/main/safe_mode.c index e66b43f12d..e0407a291d 100644 --- a/main/safe_mode.c +++ b/main/safe_mode.c @@ -55,6 +55,8 @@ PHPAPI int php_checkuid_ex(const char *filename, const char *fopen_mode, int mod php_stream_wrapper *wrapper = NULL; TSRMLS_FETCH(); + path[0] = '\0'; + if (!filename) { return 0; /* path must be provided */ } @@ -84,7 +86,7 @@ PHPAPI int php_checkuid_ex(const char *filename, const char *fopen_mode, int mod * If that fails, passthrough and check directory... */ if (mode != CHECKUID_ALLOW_ONLY_DIR) { - VCWD_REALPATH(filename, path); + expand_filepath(filename, path TSRMLS_CC); ret = VCWD_STAT(path, &sb); if (ret < 0) { if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS) { |
