httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r702162 - /httpd/httpd/branches/1.3.x/src/support/logresolve.c
Date Mon, 06 Oct 2008 14:29:12 GMT
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



Mime
View raw message