You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Kunihiro Tanaka <ta...@apache.or.jp> on 2001/03/14 05:07:58 UTC

general/7404: Core dump (Hostname lookup)

>Number:         7404
>Category:       general
>Synopsis:       Core dump (Hostname lookup)
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Mar 13 20:10:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     tanaka@apache.or.jp
>Release:        1.3.19
>Organization:
apache
>Environment:
FreeBSD vd.sakura.ad.jp 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Nov 20 13:02:55 GMT 2000

Apache 1.3.19
Compiled-in modules:
  http_core.c
  mod_status.c
  mod_autoindex.c
  mod_dir.c
  mod_alias.c
  mod_so.c
suexec: enabled; valid wrapper /usr/local/apache/bin/suexec
>Description:
apache core dumped
>How-To-Repeat:

>Fix:
--- src/main/util.c.orig        Thu Feb  1 19:06:37 2001
+++ src/main/util.c     Wed Mar 14 12:32:10 2001
@@ -2048,14 +2048,14 @@
         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 */
             }
         }
        else
-            /* Since we found a fdqn, return it with no logged message. */
+            /* Since we found a fqdn, return it with no logged message. */
             return server_hostname;
     }
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]