From: Christophe Jaillet Date: Sat, 8 Jun 2013 14:58:53 +0000 (+0000) Subject: NULL terminate the right buffer X-Git-Tag: 2.5.0-alpha~5358 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=34e215285cd65074e72e6a938b7789ca3a1eb299;p=apache NULL terminate the right buffer git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1490994 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index e293570adf..1e435ee154 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -2365,7 +2365,7 @@ static apr_status_t send_http_connect(proxy_conn_rec *backend, nbytes = sizeof(drain_buffer) - 1; while (status == APR_SUCCESS && nbytes) { status = apr_socket_recv(backend->sock, drain_buffer, &nbytes); - buffer[nbytes] = '\0'; + drain_buffer[nbytes] = '\0'; nbytes = sizeof(drain_buffer) - 1; if (strstr(drain_buffer, "\r\n\r\n") != NULL) { break;