httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: httpd-2.0/server util.c
Date Wed, 12 Feb 2003 17:17:31 GMT
bnicholes    2003/02/12 09:17:31

  Modified:    server   Tag: APACHE_2_0_BRANCH util.c
  Log:
  Avoid passing too many characters to getenv.  Make sure that only the
  environment variable string is passed.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.133.2.2 +3 -1      httpd-2.0/server/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/util.c,v
  retrieving revision 1.133.2.1
  retrieving revision 1.133.2.2
  diff -u -r1.133.2.1 -r1.133.2.2
  --- util.c	3 Feb 2003 17:32:01 -0000	1.133.2.1
  +++ util.c	12 Feb 2003 17:17:31 -0000	1.133.2.2
  @@ -837,8 +837,10 @@
                  strncat(tmp,word,s - word);
                  if ((s[1] == '{') && (e=ap_strchr_c(s,'}'))) {
                          const char *e2 = e;
  +                       char *var;
                          word = e + 1;
  -                       e = getenv(s+2);
  +                       var = apr_pstrndup(p, s+2, e2-(s+2));
  +                       e = getenv(var);
                          if (e) {
                              strcat(tmp,e);
                          } else {
  
  
  

Mime
View raw message