From: Greg Ames Date: Fri, 8 Feb 2002 02:25:42 +0000 (+0000) Subject: ensure that ap_rgetline allocates storage for the request line each time it is X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ce68c38ff86243de80ed775259af5e815e703fc;p=apache ensure that ap_rgetline allocates storage for the request line each time it is 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 --- diff --git a/server/protocol.c b/server/protocol.c index 73b7f60508..47016f9e7c 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -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);