summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2002-08-29 15:48:00 +0000
committerIlia Alshanetsky <iliaa@php.net>2002-08-29 15:48:00 +0000
commit8cb45d3f37cc93840cd138d8fbbc607f27ef59e8 (patch)
tree417ffbdf87b8d8cfa72db66fcfb0f26ebb26dae5
parente4cf66c00aec0393dbb517bab745a229112482f1 (diff)
downloadphp-git-8cb45d3f37cc93840cd138d8fbbc607f27ef59e8.tar.gz
MFH fix for bug: #18966
-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 f2efa21867..ad435c9d9e 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);
}