]> granicus.if.org Git - php/commitdiff
fix crash bug (unlikely, but this is the only place where the reported bug
authorSterling Hughes <sterling@php.net>
Wed, 9 May 2001 04:54:46 +0000 (04:54 +0000)
committerSterling Hughes <sterling@php.net>
Wed, 9 May 2001 04:54:46 +0000 (04:54 +0000)
would make sense, and it can't hurt)...

ext/sockets/sockets.c

index ea784729e89168181f6ea78b588819df0bec3d72..67666e523ee795edd60ea1019d140b4fdf3991c1 100644 (file)
@@ -1093,6 +1093,10 @@ PHP_FUNCTION(strerror)
        } else {
                buf = strerror(-(Z_LVAL_PP(error)));
        }
+
+       if (!buf) {
+               RETURN_FALSE;
+       }
        
        RETURN_STRING((char *)buf, 1);
 }