httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rede...@apache.org
Subject cvs commit: httpd-2.0/modules/metadata mod_env.c
Date Sat, 24 Aug 2002 19:03:34 GMT
rederpj     2002/08/24 12:03:34

  Modified:    .        CHANGES
               modules/metadata mod_env.c
  Log:
  Fix a null pointer dereference in the merge_env_dir_configs function of
  the mod_env module. PR 11791     [Paul J. Reder]
  
  Revision  Changes    Path
  1.897     +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.896
  retrieving revision 1.897
  diff -u -r1.896 -r1.897
  --- CHANGES	23 Aug 2002 17:24:38 -0000	1.896
  +++ CHANGES	24 Aug 2002 19:03:33 -0000	1.897
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0.41
   
  +  *) Fix a null pointer dereference in the merge_env_dir_configs
  +     function of the mod_env module. PR 11791
  +     [Paul J. Reder]
  +
     *) New option to ServerTokens 'maj[or]'. Only show the major version
        Also Surfaced this directive in the standard config (default FULL)
        [Ian Holsman]
  
  
  
  1.29      +10 -6     httpd-2.0/modules/metadata/mod_env.c
  
  Index: mod_env.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_env.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- mod_env.c	17 May 2002 11:33:10 -0000	1.28
  +++ mod_env.c	24 Aug 2002 19:03:34 -0000	1.29
  @@ -111,17 +111,21 @@
       res->unsetenv = NULL;
   
       arr = apr_table_elts(add->unsetenv);
  -    elts = (const apr_table_entry_t *)arr->elts;
  +    if (arr) {
  +        elts = (const apr_table_entry_t *)arr->elts;
   
  -    for (i = 0; i < arr->nelts; ++i) {
  -        apr_table_unset(res->vars, elts[i].key);
  +        for (i = 0; i < arr->nelts; ++i) {
  +            apr_table_unset(res->vars, elts[i].key);
  +        }
       }
   
       arr = apr_table_elts(add->vars);
  -    elts = (const apr_table_entry_t *)arr->elts;
  +    if (arr) {
  +        elts = (const apr_table_entry_t *)arr->elts;
   
  -    for (i = 0; i < arr->nelts; ++i) {
  -        apr_table_setn(res->vars, elts[i].key, elts[i].val);
  +        for (i = 0; i < arr->nelts; ++i) {
  +            apr_table_setn(res->vars, elts[i].key, elts[i].val);
  +        }
       }
   
       return res;
  
  
  

Mime
View raw message