From dea14fc70782aa7c622a0ef5af9b163f042c05f9 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 4 Nov 2015 22:29:27 +0100 Subject: [PATCH] zero cwd buffer before passing to chmod --- Zend/zend_virtual_cwd.c | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.40.0