From: Sterling Hughes Date: Wed, 9 May 2001 04:54:46 +0000 (+0000) Subject: fix crash bug (unlikely, but this is the only place where the reported bug X-Git-Tag: php-4.0.6RC1~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59d4dfc4c603ad3939911325b18f752caa407ce5;p=php fix crash bug (unlikely, but this is the only place where the reported bug would make sense, and it can't hurt)... --- diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index ea784729e8..67666e523e 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -1093,6 +1093,10 @@ PHP_FUNCTION(strerror) } else { buf = strerror(-(Z_LVAL_PP(error))); } + + if (!buf) { + RETURN_FALSE; + } RETURN_STRING((char *)buf, 1); }