diff options
Diffstat (limited to 'TSRM/tsrm_virtual_cwd.c')
| -rw-r--r-- | TSRM/tsrm_virtual_cwd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 8955bd8234..de126e6c7a 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -480,9 +480,9 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func { int new_path_length; - new_path_length = GetLongPathName(path, NULL, 0) + 1; + new_path_length = GetLongPathName(path, NULL, 0); if (new_path_length == 0) { - return 1; + goto php_failed_getlongpath; } /* GetLongPathName already counts the \0 */ @@ -496,6 +496,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func path_length = new_path_length; } else { free(new_path); +php_failed_getlongpath: new_path = NULL; } } |
