Re: com php-src: check if the winver was indeed fetched: ext/standard/info.c

From: Date: Sat, 13 Sep 2014 21:50:49 +0000
Subject: Re: com php-src: check if the winver was indeed fetched: ext/standard/info.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81566@lists.php.net to get a copy of this message
On Sat, Sep 13, 2014 at 11:21 PM, Anatol Belski <ab@php.net> wrote: > Commit: a7690fea7af57855fd0e05d9623d0a4467329003 > Author: Anatol Belski <ab@php.net> Sat, 13 Sep 2014 20:42:46 > +0200 > Parents: bce562b75efcdacc762a3b94915cdf02056b22dc > Branches: master > > Link: > > http://git.php.net/?p=php-src.git;a=commitdiff;h=a7690fea7af57855fd0e05d9623d0a4467329003 > > Log: > check if the winver was indeed fetched > > Changed paths: > M ext/standard/info.c > > > Diff: > diff --git a/ext/standard/info.c b/ext/standard/info.c > index a1a44cb..67944b3 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)); > If it's not supposed to happen, maybe a ZEND_ASSERT(winver != NULL) will be enough? Nikita

« previous php.cvs (#81566) next »