From: Bill Stoddard Date: Mon, 31 Dec 2001 21:03:12 +0000 (+0000) Subject: Fix mod_proxy seg fault when the proxied server returns X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2dd7322e703bfeacc216367ef9f40d0b554ee823;p=apache Fix mod_proxy seg fault when the proxied server returns an HTTP/0.9 response or a bogus status line. Submitted by: Adam Sussman Reviewed by: Bill Stoddard git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92693 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 455ed943b0..8ac6dc3fcc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,8 @@ Changes with Apache 2.0.30-dev + *) Fix mod_proxy seg fault when the proxied server returns + an HTTP/0.9 response or a bogus status line. + [Adam Sussman] + *) Prevent mod_proxy from truncating one character off the end of the status line returned from the proxied server. [Adam Sussman, Bill Stoddard] diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index e45021c9b2..81fd0a510a 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -801,7 +801,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, /* Is it an HTTP/0.9 response? If so, send the extra data */ if (backasswards) { apr_ssize_t cntr = len; - e = apr_bucket_heap_create(buffer, cntr, 0); + e = apr_bucket_heap_create(buffer, cntr, 1); APR_BRIGADE_INSERT_TAIL(bb, e); }