]> granicus.if.org Git - php/commitdiff
zero cwd buffer before passing to chmod
authorAnatol Belski <ab@php.net>
Wed, 4 Nov 2015 21:29:27 +0000 (22:29 +0100)
committerAnatol Belski <ab@php.net>
Thu, 5 Nov 2015 13:46:18 +0000 (14:46 +0100)
Zend/zend_virtual_cwd.c

index 4206d4d2e8fd099d29e7d95f0474781452f568fc..99c3f3003ddca3af3ff7df27feb91aa4ceaef062 100644 (file)
@@ -459,6 +459,9 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
                }
        }
 #else
+#ifdef ZEND_WIN32
+       ZeroMemory(&cwd, sizeof(cwd));
+#endif
        result = getcwd(cwd, sizeof(cwd));
 #endif
        if (!result) {