]> granicus.if.org Git - apache/commitdiff
ensure that ap_rgetline allocates storage for the request line each time it is
authorGreg Ames <gregames@apache.org>
Fri, 8 Feb 2002 02:25:42 +0000 (02:25 +0000)
committerGreg Ames <gregames@apache.org>
Fri, 8 Feb 2002 02:25:42 +0000 (02:25 +0000)
called.

This fixes a number of segfaults on daedalus where the first line is
empty (i.e. \r\n followed by a bunch of garbage)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93332 13f79535-47bb-0310-9956-ffa450edef68

server/protocol.c

index 73b7f60508415d188625d755b2aa44ec225cb6fa..47016f9e7cc567ed254c882ea68dab4efe5e00a8 100644 (file)
@@ -593,6 +593,10 @@ static int read_request_line(request_rec *r)
     do {
         apr_status_t rv;
 
+        /* insure ap_rgetline allocates storage each time thru the loop
+         * if there are empty lines
+         */
+        r->the_request = NULL;
         rv = ap_rgetline(&(r->the_request), DEFAULT_LIMIT_REQUEST_LINE + 2,
                          &len, r, 0);