From: Anatol Belski Date: Sat, 13 Sep 2014 18:42:46 +0000 (+0200) Subject: check if the winver was indeed fetched X-Git-Tag: PRE_NATIVE_TLS_MERGE~150^2~18^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a7690fea7af57855fd0e05d9623d0a4467329003;p=php check if the winver was indeed fetched --- diff --git a/ext/standard/info.c b/ext/standard/info.c index a1a44cbae6..67944b350e 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -585,6 +585,12 @@ PHPAPI zend_string *php_get_uname(char mode) char *winver = php_get_windows_name(); char wincpu[20]; + if (NULL == winver) { + TSRMLS_FETCH(); + /* This should never happen */ + return STR_EMPTY_ALLOC(); + } + php_get_windows_cpu(wincpu, sizeof(wincpu)); dwBuild = (DWORD)(HIWORD(dwVersion));