httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_include.c
Date Fri, 29 Mar 2002 02:14:45 GMT
brianp      02/03/28 18:14:45

  Modified:    .        CHANGES
               modules/filters mod_include.c
  Log:
  Fixes for three problems in mod_include:
    * The ctx->tag_length computation in find_end_sequence() was a bit
      broken in cases where there was a "false alarm" match on a partial
      "-->"
    * The ap_ssi_get_tag_and_value() function needs to avoid walking off
      the end of the string.  After debugging this some more, I ended up
      using Cliff's original patch.
    * Infinite loop in is_only_below()
  
  Revision  Changes    Path
  1.666     +2 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.665
  retrieving revision 1.666
  diff -u -r1.665 -r1.666
  --- CHANGES	28 Mar 2002 19:04:48 -0000	1.665
  +++ CHANGES	29 Mar 2002 02:14:44 -0000	1.666
  @@ -1,5 +1,7 @@
   Changes with Apache 2.0.35
   
  +  *) Fix some mod_include segfaults [Cliff Woolley, Brian Pane, Brad Nicholes]
  +
     *) Update the Redhat Layout to match Redhat version 7. PR BZ-7422
        [Joe Orton] 
   
  
  
  
  1.210     +10 -3     httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.209
  retrieving revision 1.210
  diff -u -r1.209 -r1.210
  --- mod_include.c	29 Mar 2002 00:39:56 -0000	1.209
  +++ mod_include.c	29 Mar 2002 02:14:45 -0000	1.210
  @@ -652,10 +652,10 @@
                                ctx->state = PARSE_TAIL;
                                ctx->tail_start_bucket = dptr;
                                ctx->tail_start_index = c - buf;
  -                             ctx->tag_length += ctx->parse_pos;
                                ctx->parse_pos = 1;
                            }
                            else {
  +                             ctx->tag_length++;
                                if (ctx->tag_length > ctx->directive_length) {
                                    ctx->state = PARSE_TAG;
                                }
  @@ -665,7 +665,6 @@
                                }
                                ctx->tail_start_bucket = NULL;
                                ctx->tail_start_index = 0;
  -                             ctx->tag_length += ctx->parse_pos;
                                ctx->parse_pos = 0;
                            }
                       }
  @@ -867,6 +866,10 @@
       char  term = '\0';
   
       *tag_val = NULL;
  +    if (ctx->curr_tag_pos - ctx->combined_tag > ctx->tag_length) {
  +        *tag = NULL;
  +        return;
  +    }
       SKIP_TAG_WHITESPACE(c);
       *tag = c;             /* First non-whitespace character (could be NULL). */
   
  @@ -1179,8 +1182,12 @@
               return 0;
   #endif
           path += dots;
  -        while (*path && *(path+1) != '/')
  +        while (*path && (*path != '/')) {
  +            ++path;
  +        }
  +        if (*path == '/') {
               ++path;
  +        }
       }
       return 1;
   }
  
  
  

Mime
View raw message