From nobody  Fri Oct 11 06:41:32 1996
Received: (from nobody@localhost)
          by freefall.freebsd.org (8.7.5/8.7.3) id GAA15852;
          Fri, 11 Oct 1996 06:41:32 -0700 (PDT)
Message-Id: <199610111341.GAA15852@freefall.freebsd.org>
Date: Fri, 11 Oct 1996 06:41:32 -0700 (PDT)
From: chou@mpd.tandem.com
To: freebsd-gnats-submit@freebsd.org
Subject: A NULL pointer causing segmentation core dumped.
X-Send-Pr-Version: www-1.0

>Number:         1773
>Category:       bin
>Synopsis:       A NULL pointer causing segmentation core dumped.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 11 06:50:01 PDT 1996
>Closed-Date:    Sat Nov 15 14:37:26 PST 1997
>Last-Modified:  Sat Nov 15 14:39:09 PST 1997
>Originator:     Gary Chou
>Release:        2.1.5
>Organization:
Tandem Computers Inc
>Environment:
FreeBSD osipc.isd.tandem.com 2.1.5-RELEASE FreeBSD 2.1.5-RELEASE #0: Wed Jul 17 03:09:31  1996     jkh@whisker.cdrom.com:/usr/src/sys/compile/GENERIC  i386

>Description:
Line 1065 in function default_server_hostnames(), the gethostbyname() will
return NULL if the "ServerName" has incorrect value in the httpd.conf.
Line 1071 will core dumped dur to the NULL pointer of "main". 


>How-To-Repeat:
Give a non-existing domain name of ServerName in httpd.conf.
>Fix:
Add checking against NULL after "gethostbyname()" as following
suggested code:
    if (!main) {
        fprintf(stderr, "httpd:  Host name(%s) lookup failure.\n", def_hostname);
        exit(1);
        }

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-ports 
Responsible-Changed-By: fenner 
Responsible-Changed-When: Mon Oct 21 14:54:12 PDT 1996 
Responsible-Changed-Why:  
This appears to be a bug report against a web server port, although it's 
not clear which one. 
Responsible-Changed-From-To: freebsd-ports->asami 
Responsible-Changed-By: scrappy 
Responsible-Changed-When: Tue Oct 22 23:44:42 PDT 1996 
Responsible-Changed-Why:  
Oops, ignore this one... 
Responsible-Changed-From-To: asami->freebsd-ports 
Responsible-Changed-By: asami 
Responsible-Changed-When: Mon Dec 16 22:39:08 PST 1996 
Responsible-Changed-Why:  
As Bill Fenner once said: 
This appears to be a bug report against a web server port, although it's 
not clear which one. 
State-Changed-From-To: open->closed 
State-Changed-By: fenner 
State-Changed-When: Sat Nov 15 14:37:26 PST 1997 
State-Changed-Why:  
The originator never told us what port this PR was filed for, and it's 
been over a year so it's likely that the port has been upgraded in the 
meantime anyway. 
>Unformatted:
