httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject cvs commit: apache-1.3/src/main util.c
Date Tue, 13 Mar 2001 10:22:24 GMT
martin      01/03/13 02:22:23

  Modified:    src      CHANGES
               src/main util.c
  Log:
  Ignasi writes,...
    The first correction is not important, only removes a redundant line,
    the ap_pstrdup(a, "127.0.0.1") is done anyway at the end of the function.
    The second correction is really a bug the p-> can be NULL.
  
  Submitted by:	"Roca Carrio, Ignasi" <Ignasi.Roca@fujitsu-siemens.com>
  
  Revision  Changes    Path
  1.1665    +4 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1664
  retrieving revision 1.1665
  diff -u -u -r1.1664 -r1.1665
  --- CHANGES	2001/03/09 10:10:09	1.1664
  +++ CHANGES	2001/03/13 10:22:14	1.1665
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3.20
   
  +  *) Fix a possible NULL pointer dereference in the detection of the
  +     default ServerName or IP string (introduced in 1.3.18).
  +     [Ignasi Roca, <Ignasi.Roca@fujitsu-siemens.com>]
  +
     *) Make EBCDIC conversion fully configurable. Until now, apache relied
        on some (incomplete) heuristics, and would fail to correctly serve
        text files when they had a MIME type of application/anything, like
  
  
  
  1.195     +1 -2      apache-1.3/src/main/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/util.c,v
  retrieving revision 1.194
  retrieving revision 1.195
  diff -u -u -r1.194 -r1.195
  --- util.c	2001/02/01 10:06:37	1.194
  +++ util.c	2001/03/13 10:22:21	1.195
  @@ -2040,7 +2040,6 @@
   	ap_log_error(APLOG_MARK, APLOG_WARNING, NULL,
   	             "%s: gethostname() failed to determine ServerName\n",
                        ap_server_argv0);
  -	server_hostname = ap_pstrdup(a, "127.0.0.1");
       }
       else 
       {
  @@ -2048,7 +2047,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 */
  
  
  

Mime
View raw message