httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aa...@apache.org
Subject cvs commit: httpd-2.0/modules/proxy proxy_http.c
Date Mon, 29 Oct 2001 15:44:04 GMT
aaron       01/10/29 07:44:04

  Modified:    modules/proxy proxy_http.c
  Log:
  Fix a truncation bug in how we print the port on the Via: header.
  The routine that prints the Via: header now takes a length for
  the port string.
  
  Submitted by:	Zvi Har'El <rl@math.technion.ac.il>
  
  Revision  Changes    Path
  1.105     +5 -3      httpd-2.0/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_http.c,v
  retrieving revision 1.104
  retrieving revision 1.105
  diff -u -r1.104 -r1.105
  --- proxy_http.c	2001/10/14 20:41:00	1.104
  +++ proxy_http.c	2001/10/29 15:44:03	1.105
  @@ -194,7 +194,8 @@
                                                   char **url,
                                                   const char *proxyname,
                                                   apr_port_t proxyport,
  -                                                char *server_portstr) {
  +                                                char *server_portstr,
  +                                                int server_portstr_size) {
       int server_port;
       apr_status_t err;
       apr_sockaddr_t *uri_addr;
  @@ -253,7 +254,7 @@
           if (ap_is_default_port(server_port, r)) {
               strcpy(server_portstr,"");
           } else {
  -            apr_snprintf(server_portstr, sizeof(server_portstr), ":%d",
  +            apr_snprintf(server_portstr, server_portstr_size, ":%d",
                            server_port);
           }
       }
  @@ -940,7 +941,8 @@
       /* Step One: Determine Who To Connect To */
       status = ap_proxy_http_determine_connection(p, r, p_conn, c, conf, uri,
                                                   &url, proxyname, proxyport,
  -                                                server_portstr);
  +                                                server_portstr,
  +                                                sizeof(server_portstr));
       if ( status != OK ) {
           return status;
       }
  
  
  

Mime
View raw message