On Mon, 23 Jul 2001, Ryan Bloom wrote:

> On Sunday 22 July 2001 19:14, William A. Rowe, Jr. wrote:
> > > rbb         01/07/22 16:00:52
> > >
> > >   Index: mod_include.c
> > >   ===================================================================
> > >   RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
> > >   retrieving revision 1.111
> > >   retrieving revision 1.112
> > >   diff -u -r1.111 -r1.112
> > >   --- mod_include.c 2001/06/13 13:44:36 1.111
> > >   +++ mod_include.c 2001/07/22 23:00:52 1.112
> > >   @@ -914,7 +914,7 @@
> > >                        tmp_buck = apr_bucket_heap_create(echo_text,
> > > e_len, 1, &e_wrt); }
> > >                    else {
> > >   -                    tmp_buck = apr_bucket_immortal_create("(none)",
> > > sizeof("none")); +                    tmp_buck =
> > > apr_bucket_immortal_create("(none)", sizeof("(none)"));
> >
> > Do you mean to add the trailing \0 to the bucket?
>
> It doesn't matter, the bucket code knows how to handle the trailing \0.

That's news to me.  If you pass in 7 as the length of "(none)", the
buckets code believes you and sets the bucket length to 7.  From then on,
any time you read the bucket, you'll get a null character in the middle of
your data stream, which is not correct.  Anyhow, I just committed the
subtract-one fix.

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA


Reply via email to