Skip to content

Commit 3374483

Browse files
author
Ilia Alshanetsky
committed
Fixed bug #18966
1 parent e040302 commit 3374483

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/dns.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static char *php_gethostbyaddr(char *ip)
128128
hp = gethostbyaddr((char *) &addr, sizeof(addr), AF_INET);
129129
#endif
130130

131-
if (!hp) {
131+
if (!hp || hp->h_name == NULL || hp->h_name == '\0') {
132132
return estrdup(ip);
133133
}
134134

0 commit comments

Comments
 (0)