httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Sat, 12 Jan 2002 02:43:31 GMT
trawick     02/01/11 18:43:31

  Modified:    .        CHANGES
               server   core.c
  Log:
  Move a check for an empty brigade to the start of core input filter
  to avoid segfaults.
  
  Using prefork MPM and APR_POOL_DEBUG and ElectricFence, I found a
  couple of paths where weren't able to report APR_EOF all the way
  back up the call tree, leading us back into core_input_filter with
  an empty brigade.
  
  Some of the paths in core_input_filter handled it, some didn't.
  
  Revision  Changes    Path
  1.518     +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.517
  retrieving revision 1.518
  diff -u -r1.517 -r1.518
  --- CHANGES	11 Jan 2002 18:55:27 -0000	1.517
  +++ CHANGES	12 Jan 2002 02:43:31 -0000	1.518
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.31-dev
   
  +  *) Move a check for an empty brigade to the start of core input filter
  +     to avoid segfaults.  [Justin Erenkrantz, Jeff Trawick]
  +
     *) Add FileETag directive to allow configurable control of what
        data are used to form ETag values for file-based URIs.  MMN
        bumped to 20020111 because of fields added to the end of
  
  
  
  1.130     +4 -3      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.129
  retrieving revision 1.130
  diff -u -r1.129 -r1.130
  --- core.c	11 Jan 2002 18:55:27 -0000	1.129
  +++ core.c	12 Jan 2002 02:43:31 -0000	1.130
  @@ -3035,6 +3035,10 @@
           APR_BRIGADE_INSERT_TAIL(ctx->b, e);
           net->in_ctx = ctx;
       }
  +    else if (APR_BRIGADE_EMPTY(ctx->b)) {
  +        /* hit EOF on socket already */
  +        return APR_EOF;
  +    }
   
       /* ### This is bad. */
       APR_BRIGADE_NORMALIZE(ctx->b);
  @@ -3114,9 +3118,6 @@
   
           AP_DEBUG_ASSERT(*readbytes > 0);
           
  -        if (APR_BRIGADE_EMPTY(ctx->b))
  -            return APR_EOF;
  -
           e = APR_BRIGADE_FIRST(ctx->b);
           rv = apr_bucket_read(e, &str, &len, mode);
   
  
  
  

Mime
View raw message