You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2008/10/06 16:29:12 UTC

svn commit: r702162 - /httpd/httpd/branches/1.3.x/src/support/logresolve.c

Author: jim
Date: Mon Oct  6 07:29:12 2008
New Revision: 702162

URL: http://svn.apache.org/viewvc?rev=702162&view=rev
Log:
protect from mismanaged DNS which return blank/null
hostnames.

Modified:
    httpd/httpd/branches/1.3.x/src/support/logresolve.c

Modified: httpd/httpd/branches/1.3.x/src/support/logresolve.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/1.3.x/src/support/logresolve.c?rev=702162&r1=702161&r2=702162&view=diff
==============================================================================
--- httpd/httpd/branches/1.3.x/src/support/logresolve.c (original)
+++ httpd/httpd/branches/1.3.x/src/support/logresolve.c Mon Oct  6 07:29:12 2008
@@ -165,7 +165,7 @@
 
 	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