diff options
| author | Anatol Belski <ab@php.net> | 2014-09-13 20:42:46 +0200 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2014-09-13 23:21:48 +0200 |
| commit | a7690fea7af57855fd0e05d9623d0a4467329003 (patch) | |
| tree | f231e024c8de015aee0f95e12cafb5138496d900 | |
| parent | bce562b75efcdacc762a3b94915cdf02056b22dc (diff) | |
| download | php-git-a7690fea7af57855fd0e05d9623d0a4467329003.tar.gz | |
check if the winver was indeed fetched
| -rw-r--r-- | ext/standard/info.c | 6 |
1 files changed, 6 insertions, 0 deletions
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)); |
