]> granicus.if.org Git - php/commitdiff
- Fixed bug #22299 (gethostbyname() crash with non-existing domain on MacOSX)
authorfoobar <sniper@php.net>
Thu, 20 Feb 2003 05:34:58 +0000 (05:34 +0000)
committerfoobar <sniper@php.net>
Thu, 20 Feb 2003 05:34:58 +0000 (05:34 +0000)
ext/standard/dns.c

index 916ff4637d2e405c491e56c472deb25215630abf..236b2471f3e3b9734ee5546098a1eec7d694ce29 100644 (file)
@@ -195,7 +195,7 @@ static char *php_gethostbyname(char *name)
 
        hp = gethostbyname(name);
 
-       if (!hp || !hp->h_addr_list) {
+       if (!hp || !*(hp->h_addr_list)) {
                return estrdup(name);
        }