From f51a9c71dd011f7d6879b326280adc05ae45f7f7 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 4 Apr 2015 20:28:58 +0200 Subject: initialize EG(windows_version_info) there are more places refering to this, but seems it was never initialized --- Zend/zend.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Zend/zend.c') diff --git a/Zend/zend.c b/Zend/zend.c index 77f7196203..77be1cd5a9 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -516,6 +516,13 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals) /* {{ executor_globals->exception_class = NULL; executor_globals->exception = NULL; executor_globals->objects_store.object_buckets = NULL; +#ifdef ZEND_WIN32 + ZeroMemory(&executor_globals->windows_version_info, sizeof(OSVERSIONINFOEX)); + executor_globals->windows_version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); + if (!GetVersionEx((OSVERSIONINFO *) &executor_globals->windows_version_info)) { + ZEND_ASSERT(0); /* Should not happen as sizeof is used. */ + } +#endif } /* }}} */ -- cgit v1.2.1