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 protocol.c
Date Sat, 26 Jan 2002 23:01:31 GMT
trawick     02/01/26 15:01:31

  Modified:    server   protocol.c
  Log:
  ap_rgetline(): completely ignore an empty bucket...  previously the logic
                 generally worked but with a memory debug build it could
                 crash since some memory debuggers don't like an alloc of
                 zero bytes
  
  Revision  Changes    Path
  1.73      +8 -0      httpd-2.0/server/protocol.c
  
  Index: protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- protocol.c	25 Jan 2002 05:39:21 -0000	1.72
  +++ protocol.c	26 Jan 2002 23:01:31 -0000	1.73
  @@ -245,6 +245,14 @@
               return rv;
           }
   
  +        if (len == 0) {
  +            /* no use attempting a zero-byte alloc (hurts when
  +             * using --with-efence --enable-pool-debug) or
  +             * doing any of the other logic either
  +             */
  +            continue;
  +        }
  +        
           /* Would this overrun our buffer?  If so, we'll die. */
           if (n < bytes_handled + len) {
               apr_brigade_destroy(b); 
  
  
  

Mime
View raw message