From: Jim Jagielski Date: Mon, 6 Oct 2008 14:29:12 +0000 (+0000) Subject: protect from mismanaged DNS which return blank/null X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f2a30a06f9ddf2db6fc8aba476014020337aa8d;p=thirdparty%2Fapache%2Fhttpd.git protect from mismanaged DNS which return blank/null hostnames. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@702162 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/support/logresolve.c b/src/support/logresolve.c index 5c769a23f67..8671a49d033 100644 --- a/src/support/logresolve.c +++ b/src/support/logresolve.c @@ -165,7 +165,7 @@ static void cgethost (struct in_addr ipnum, char *string, int check) hostdata = gethostbyaddr((const char *) &ipnum, sizeof(struct in_addr), AF_INET); - if (hostdata == NULL) { + if (hostdata == NULL || !hostdata->h_name || !*hostdata->h_name) { if (h_errno > MAX_ERR) errors[UNKNOWN_ERR]++; else