joes        2004/08/02 12:04:22

  Modified:    src      apreq_parsers.c
  Log:
  Transient buckets morph when setaside, which can cause memory corruption in 
the way the mfd parser handles the param name.  Use immortal buckets instead to 
ensure setaside is a noop.
  
  Revision  Changes    Path
  1.60      +2 -2      httpd-apreq-2/src/apreq_parsers.c
  
  Index: apreq_parsers.c
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/src/apreq_parsers.c,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- apreq_parsers.c   31 Jul 2004 23:56:40 -0000      1.59
  +++ apreq_parsers.c   2 Aug 2004 19:04:22 -0000       1.60
  @@ -948,7 +948,7 @@
   
               case APR_SUCCESS:
                   /* part has no body- return CRLF to front */
  -                e = apr_bucket_transient_create(CRLF, 2,
  +                e = apr_bucket_immortal_create(CRLF, 2,
                                                   ctx->bb->bucket_alloc);
                   APR_BRIGADE_INSERT_HEAD(ctx->in,e);
                   break;
  @@ -975,7 +975,7 @@
   
               if (s != APR_SUCCESS) {
                   name = apr_pstrmemdup(pool, name, nlen);
  -                e = apr_bucket_transient_create(name, nlen,
  +                e = apr_bucket_immortal_create(name, nlen,
                                                   ctx->bb->bucket_alloc);
                   APR_BRIGADE_INSERT_HEAD(ctx->bb,e);
                   ctx->status = MFD_PARAM;
  
  
  

Reply via email to