httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Mon, 16 Sep 2002 13:11:55 GMT
trawick     2002/09/16 06:11:55

  Modified:    server   core.c
  Log:
  zap a gcc warning about using an uninitialized variable (new) and
  check for a possible syntax error
  
  Revision  Changes    Path
  1.205     +8 -3      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.204
  retrieving revision 1.205
  diff -u -r1.204 -r1.205
  --- core.c	15 Sep 2002 22:04:01 -0000	1.204
  +++ core.c	16 Sep 2002 13:11:55 -0000	1.205
  @@ -2577,7 +2577,7 @@
                                            const char *arg, const char *arg2)
   {
       core_dir_config *conf = conf_;
  -    ap_filter_rec_t *old, *new;
  +    ap_filter_rec_t *old, *new = NULL;
       const char *filter_name;
   
       if (!conf->ct_output_filters) {
  @@ -2590,7 +2590,8 @@
       }
   
       while (*arg &&
  -           (filter_name = ap_getword(cmd->pool, &arg, ';'))) {
  +           (filter_name = ap_getword(cmd->pool, &arg, ';')) &&
  +           strcmp(filter_name, "")) {
           new = apr_pcalloc(cmd->pool, sizeof(ap_filter_rec_t));
           new->name = filter_name;
   
  @@ -2601,12 +2602,16 @@
           old = new;
       }
   
  +    if (!new) {
  +        return "invalid filter name";
  +    }
  +    
       apr_hash_set(conf->ct_output_filters, arg2, APR_HASH_KEY_STRING, new);
   
       return NULL;
   }
   /* 
  - * Insert filters requested by the AddOutputFiltersByType 
  + * Insert filters requested by the AddOutputFilterByType 
    * configuration directive. We cannot add filters based 
    * on content-type until after the handler has started 
    * to run. Only then do we reliably know the content-type.
  
  
  

Mime
View raw message