]> granicus.if.org Git - apache/commitdiff
NULL terminate the right buffer
authorChristophe Jaillet <jailletc36@apache.org>
Sat, 8 Jun 2013 14:58:53 +0000 (14:58 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sat, 8 Jun 2013 14:58:53 +0000 (14:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1490994 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_util.c

index e293570adf4c3c12609a40951dd65f829ee71972..1e435ee15448f2bf7de13abf0f0382663ffe11f3 100644 (file)
@@ -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;