]> granicus.if.org Git - apache/commitdiff
protect one-off boundary
authorJim Jagielski <jim@apache.org>
Wed, 23 Feb 2011 13:03:58 +0000 (13:03 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 23 Feb 2011 13:03:58 +0000 (13:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1073728 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_balancer.c

index e5db47b0d3681fb4c27ae511408ef59db42ca9c6..cf4c7397756916d7fd806df098d7da6643c832ae 100644 (file)
@@ -938,12 +938,12 @@ static int balancer_handler(request_rec *r)
     }
     if (r->method_number == M_POST) {
         apr_bucket_brigade *ib;
-        apr_size_t len;
-        char *buf = apr_pcalloc(r->pool, 1024);;
+        apr_size_t len = 1024;
+        char *buf = apr_pcalloc(r->pool, len+1);
         
         ib = apr_brigade_create(r->connection->pool, r->connection->bucket_alloc);
         rv = ap_get_brigade(r->input_filters, ib, AP_MODE_READBYTES,
-                                APR_BLOCK_READ, 1024);
+                                APR_BLOCK_READ, len);
         if (rv != APR_SUCCESS) {
             return HTTP_INTERNAL_SERVER_ERROR;
         }