httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1073728 - /httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
Date Wed, 23 Feb 2011 13:03:59 GMT
Author: jim
Date: Wed Feb 23 13:03:58 2011
New Revision: 1073728

URL: http://svn.apache.org/viewvc?rev=1073728&view=rev
Log:
protect one-off boundary

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c?rev=1073728&r1=1073727&r2=1073728&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c Wed Feb 23 13:03:58 2011
@@ -938,12 +938,12 @@ static int balancer_handler(request_rec 
     }
     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;
         }



Mime
View raw message