httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject cvs commit: httpd-2.0/server protocol.c
Date Thu, 27 Mar 2003 20:34:56 GMT
gregames    2003/03/27 12:34:56

  Modified:    server   protocol.c
  Log:
  ap_rgetline_core: set the number of bytes read & copied into the caller's
  buffer when returning APR_ENOSPC.  This prevents seg faults in
  ap_get_mime_headers_core in an error path which handles headers that are too
  long.
  
  Submitted by:	Jeff Trawick
  
  Revision  Changes    Path
  1.129     +3 -0      httpd-2.0/server/protocol.c
  
  Index: protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
  retrieving revision 1.128
  retrieving revision 1.129
  diff -u -r1.128 -r1.129
  --- protocol.c	24 Mar 2003 16:39:25 -0000	1.128
  +++ protocol.c	27 Mar 2003 20:34:56 -0000	1.129
  @@ -290,6 +290,7 @@
   
           /* Would this overrun our buffer?  If so, we'll die. */
           if (n < bytes_handled + len) {
  +            *read = bytes_handled;
               return APR_ENOSPC;
           }
   
  @@ -390,6 +391,7 @@
               last_char = *s + bytes_handled - 1;
           }
           else {
  +            *read = n;
               return APR_ENOSPC;
           }
       }
  @@ -519,6 +521,7 @@
                   return APR_SUCCESS;
               }
               else {
  +                *read = n;
                   return APR_ENOSPC;
               }
           }
  
  
  

Mime
View raw message