summaryrefslogtreecommitdiff
path: root/ext/standard
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2002-08-29 15:44:00 +0000
committerIlia Alshanetsky <iliaa@php.net>2002-08-29 15:44:00 +0000
commit337448322f8797ac7778bce9c3fd500d1987d9c4 (patch)
treea4801b52b7c78c79e69c6f6f6897a6afe954e5ba /ext/standard
parente040302807853f4486a42fb292aa8298ebf5ee12 (diff)
downloadphp-git-337448322f8797ac7778bce9c3fd500d1987d9c4.tar.gz
Fixed bug #18966
Diffstat (limited to 'ext/standard')
-rw-r--r--ext/standard/dns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index 5d65f12554..8dff743cd6 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -128,7 +128,7 @@ static char *php_gethostbyaddr(char *ip)
hp = gethostbyaddr((char *) &addr, sizeof(addr), AF_INET);
#endif
- if (!hp) {
+ if (!hp || hp->h_name == NULL || hp->h_name == '\0') {
return estrdup(ip);
}