httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Cholet <cho...@logilune.com>
Subject [PATCH] 1.3 segfault
Date Tue, 24 Apr 2001 18:56:11 GMT
Hi,

Running 1.3 on a misconfigured box I get a segfault fixed
by this patch:

--- util.c.orig Thu Feb  1 11:06:37 2001
+++ util.c      Tue Apr 24 21:58:17 2001
@@ -2048,7 +2048,7 @@
         if ((!(p = gethostbyname(str)))
             || (!(server_hostname = find_fqdn(a, p)))) {
             /* Recovery - return the default servername by IP: */
-            if (p->h_addr_list[0]) {
+            if (p && p->h_addr_list[0]) {
                 ap_snprintf(str, sizeof(str), "%pA", p->h_addr_list[0]);
                server_hostname = ap_pstrdup(a, str);
                 /* We will drop through to report the IP-named server */

--
Eric Cholet
B995 E519 1594 10D0 4271 1EA5 8DF3 8004

Mime
View raw message