httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: apache-1.3/src/main http_vhost.c
Date Mon, 29 Mar 2004 21:03:25 GMT
jim         2004/03/29 13:03:25

  Modified:    src/main http_vhost.c
  Log:
  Add in some error detection, since this is userland provided
  info.
  
  Revision  Changes    Path
  1.40      +6 -1      apache-1.3/src/main/http_vhost.c
  
  Index: http_vhost.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_vhost.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- http_vhost.c	29 Mar 2004 18:30:55 -0000	1.39
  +++ http_vhost.c	29 Mar 2004 21:03:25 -0000	1.40
  @@ -691,8 +691,13 @@
                   goto bad;
               else {
                   /* a known "good" port value */
  +                int iport;
  +                iport = atoi(port_str);
  +                if (iport < 1 || iport > 65535) {
  +                    goto bad;
  +                }
                   r->parsed_uri.port_str = ap_pstrdup(r->pool, port_str);
  -                r->parsed_uri.port = atoi(r->parsed_uri.port_str);
  +                r->parsed_uri.port = iport;
                   break;
               }
           }
  
  
  

Mime
View raw message