httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/standard mod_include.c
Date Fri, 15 Sep 2000 21:23:46 GMT
trawick     00/09/15 14:23:46

  Modified:    src/modules/standard mod_include.c
  Log:
  Handle a tag that appears at the start of a bucket.
  
  Get rid of an endless loop (waiting for dptr2 to become NULL instead of
  AP_BRIGADE_SENTINEL()).
  
  Add to a to-do comment.
  
  Revision  Changes    Path
  1.57      +11 -2     apache-2.0/src/modules/standard/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_include.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- mod_include.c	2000/09/14 18:42:56	1.56
  +++ mod_include.c	2000/09/15 21:23:46	1.57
  @@ -210,6 +210,10 @@
                        * on what we are searching for.
                        */
                       if (str[0] == '<') {
  +                        if (c - buf - strlen(str) == 0) {
  +                            /* first thing in bucket is tag; nothing to split */
  +                            return dptr;
  +                        }
                           dptr->split(dptr, c - buf - strlen(str));
                       }
                       else {
  @@ -2294,12 +2298,17 @@
           if ((tagbuck = find_string(dptr, STARTING_SEQUENCE, AP_BRIGADE_LAST(bb))) != NULL)
{
               dptr2 = tagbuck;
               dptr = tagbuck;
  -            while (dptr2 && 
  +            while (dptr2 != AP_BRIGADE_SENTINEL(bb) && 
                     (endsec = find_string(dptr2, ENDING_SEQUENCE, AP_BRIGADE_LAST(bb))) ==
NULL) {
                   dptr2 = AP_BUCKET_NEXT(dptr2);
               }
               if (endsec == NULL) {
  -                /** No ending tag, needs to become an error bucket */
  +                /** XXX No ending tag, needs to become an error bucket
  +                 ** Tag could come in the next brigade (unless we've 
  +                 ** received eos in this brigade).
  +                 **
  +                 ** We're about to segfault.
  +                 **/
               }
                
               /* At this point, everything between tagbuck and endsec is an SSI
  
  
  

Mime
View raw message