]> granicus.if.org Git - php/commitdiff
Fixed a bug noticed by Jon Parise.
authorIlia Alshanetsky <iliaa@php.net>
Tue, 22 Oct 2002 18:57:59 +0000 (18:57 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 22 Oct 2002 18:57:59 +0000 (18:57 +0000)
TSRM/tsrm_virtual_cwd.c

index 4e12b955fb924f886061a320a63605deaa3fdd38..ce4f2538f2e83a82d42d681e9a7d92d61c2095aa 100644 (file)
@@ -289,9 +289,9 @@ CWD_API char *virtual_link(char *buf, size_t size TSRMLS_DC)
        char resolved_path[MAXPATHLEN];
        
        if (IS_ABSOLUTE_PATH(buf, size)) {
-               memcpy(resolved_path, buf, size);
-               p[size] = '\0';
                p = resolved_path;
+               memcpy(p, buf, size);
+               p[size] = '\0';
        } else {
                virtual_getcwd(tmp_path, MAXPATHLEN TSRMLS_CC);
                p = tmp_path + strlen(tmp_path);