diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-07-27 17:50:41 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-07-27 17:50:41 +0200 |
commit | 1aeff522b8e5ee77b9ae91bab59699db4dfc2c7e (patch) | |
tree | f082b6960aa54138a4cdafdaa09468bd2f6ec68f /Zend | |
parent | d5b59b4303642adac91df2c93969a72bc0f5fa7d (diff) | |
download | php-git-1aeff522b8e5ee77b9ae91bab59699db4dfc2c7e.tar.gz |
Revert "Fix #79806: realpath() erroneously resolves link to link"
This reverts commit d5b59b4303642adac91df2c93969a72bc0f5fa7d.
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_virtual_cwd.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c index 3b90074683..253ed8c420 100644 --- a/Zend/zend_virtual_cwd.c +++ b/Zend/zend_virtual_cwd.c @@ -845,7 +845,6 @@ static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, tim } #ifdef ZEND_WIN32 -retry_reparse_point: if (save) { pathw = php_win32_ioutil_any_to_w(path); if (!pathw) { @@ -868,7 +867,7 @@ retry_reparse_point: tmp = do_alloca(len+1, use_heap); memcpy(tmp, path, len+1); -retry_reparse_tag_cloud: +retry: if(save && !(IS_UNC_PATH(path, len) && len >= 3 && path[2] != '?') && (dataw.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) @@ -929,7 +928,7 @@ retry_reparse_tag_cloud: dataw.dwFileAttributes = fileInformation.dwFileAttributes; CloseHandle(hLink); (*ll)--; - goto retry_reparse_tag_cloud; + goto retry; } free_alloca(tmp, use_heap); CloseHandle(hLink); @@ -1076,15 +1075,6 @@ retry_reparse_tag_cloud: free_alloca(pbuffer, use_heap_large); free(substitutename); - { - DWORD attrs = GetFileAttributesA(path); - if (!isVolume && (attrs & FILE_ATTRIBUTE_REPARSE_POINT)) { - free_alloca(tmp, use_heap); - FREE_PATHW() - goto retry_reparse_point; - } - } - if(isabsolute == 1) { if (!((j == 3) && (path[1] == ':') && (path[2] == '\\'))) { /* use_realpath is 0 in the call below coz path is absolute*/ |