httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: cvs commit: apache-2.0/src/modules/standard mod_include.c
Date Sun, 17 Sep 2000 01:52:48 GMT
rbb@covalent.net writes:

> On 16 Sep 2000, Jeff Trawick wrote:
> > Here is your original loop:
> > 
> >         if ((tagbuck = find_string(dptr, STARTING_SEQUENCE, AP_BRIGADE_LAST(bb)))
!= NULL) {
> >             dptr2 = tagbuck;
> >             dptr = tagbuck;
> >             while (dptr2 && 
> >                   (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 */
> >             }
> > 
> > The conditions for your while loop make no sense.  dptr2 will never
> > become NULL and there is no guarantee that we'll find the ending
> > sequence in this brigade.
> 
> No, that's wrong.  dptr2 is NULL if the starting sequence is not
> found.

But we wouldn't reach the while loop if the starting sequence was not
found.  The loop is inside a check for tagbuck != NULL.

> I'm actually more likely to start re-writing mod_include from
> scratch.  I'm going to try to work on this again, but I also have other
> projects I am trying to get through.  I am likely to look at mod_include
> again in a week or two.  Currently, it is almost completely wrong, but I
> wanted to get it compiling again.  It really needs a complete
> re-write.  If you have other projects that are a better way to spend your
> time, then I suggest doing those.  Otherwise, let me know and I'll back
> off mod_include all together.

I'll back off for now.

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message