From: Anatol Belski Date: Wed, 4 Nov 2015 21:29:27 +0000 (+0100) Subject: zero cwd buffer before passing to chmod X-Git-Tag: php-7.0.1RC1~168 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dea14fc70782aa7c622a0ef5af9b163f042c05f9;p=php zero cwd buffer before passing to chmod --- diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c index 4206d4d2e8..99c3f3003d 100644 --- a/Zend/zend_virtual_cwd.c +++ b/Zend/zend_virtual_cwd.c @@ -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) {