On Tue, 24 Apr 2001, Eric Cholet wrote:

> 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 */
>

This is a bug in 1.3.19, but it's been fixed in CVS for a while now.  In
fact, the current version tests it one further, doing this:

if (p && p->h_addr_list && p->h_addr_list[0])

Thanks,
Cliff

--------------------------------------------------------------
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA


Reply via email to