httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: segfaults on CGI's with current CVS snapshot
Date Tue, 05 Aug 1997 00:08:34 GMT
Can you post the exact set of changes you're backing out?  'cause as I say
that change to http_request there doesn't stand alone, you need the
parse_htaccess change as well.

I would believe that the changes around rev 1.57 of http_request.c could
corrupt memory... I may have committed an off-by-1 booboo.

Dean

On Mon, 4 Aug 1997, Marc Slemko wrote:

> If I back that set of changes out, no problem.  If I put them in, problem.
> 
> If I put them in but disable the for() at the start of parse_htaccess that
> searches the cache, no problem.  But it doesn't seem to be crashing
> anywhere around there.  Looks like something is corrupting memory
> bigtime... or I'm crazy.
> 
> 
> On Mon, 4 Aug 1997, Dean Gaudet wrote:
> 
> > Then look at the other change, the change to parse_htaccess.  This occured
> > at the same time as that change.
> > 
> > Dean
> > 
> > On Mon, 4 Aug 1997, Marc Slemko wrote:
> > 
> > > On Mon, 4 Aug 1997, Dean Gaudet wrote:
> > > 
> > > > That's me. 
> > > 
> > > Nono, the patch is (or is not, depending on how you look at it...) 
> > > reversed.  Look closely.  _removing_ all that code is what breaks things.
> > > 
> > > > 
> > > > test_htaccess is a scratch area where we can write the name of the
> > > > .htaccess file -- I might have messed up the length calculation.
> > > > 
> > > > test_filename_len is the length of r->filename
> > > > 
> > > > test_dirname is the scratch area that it's using to walk down
> > > > r->filename's parent directories
> > > > 
> > > > test_dirname_tail points at the \0 at the end of test_dirname
> > > > 
> > > > But wait ... this section of code isn't in HEAD any more ... since I
> > > > merged in a patch that enabled multiple .htaccess names.  ?? 
> > > > 
> > > > Dean
> > > > 
> > > > On Mon, 4 Aug 1997, Marc Slemko wrote:
> > > > 
> > > > > Ok.
> > > > > 
> > > > > The problem pops up between rev. 1.57 and 1.58 of http_request.c.
 If
> > > > > I had _any_ idea of what the heck this diff was supposed to do
> > > > > I may be able to fix it.  But I don't.  
> > > > > 
> > > > > --- http_request.c      1997/07/07 14:34:27     1.57
> > > > > +++ http_request.c      1997/07/08 02:04:44     1.58
> > > > > @@ -414,18 +414,8 @@
> > > > >          */
> > > > >         
> > > > >         if (overrides_here) {
> > > > > -           int len;
> > > > > -
> > > > > -           if (test_htaccess == NULL) {
> > > > > -               /* we delayed allocating this in case there wasn't
a need */
> > > > > -               test_htaccess = palloc (r->pool,
> > > > > -                   test_filename_len + 1 + strlen (sconf->access_name));
> > > > > -           }
> > > > > -           len = test_dirname_tail - test_dirname;
> > > > > -           memcpy (test_htaccess, test_dirname, len);
> > > > > -           strcpy (test_htaccess + len, sconf->access_name);
> > > > > -           res = parse_htaccess (&htaccess_conf, r, overrides_here,
> > > > > -                                 test_dirname, test_htaccess);
> > > > > +           res = parse_htaccess (&htaccess_conf, r, overrides_here,
> > > > > +                                 test_dirname, sconf->access_name);
> > > > >             if (res) return res;
> > > > >         }
> > > > > 
> > > > > 
> > > > > 
> > > > 
> > > 
> > > 
> > 
> 
> 


Mime
View raw message