]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
cast first
authorEric Covener <covener@apache.org>
Wed, 1 Jun 2022 12:29:46 +0000 (12:29 +0000)
committerEric Covener <covener@apache.org>
Wed, 1 Jun 2022 12:29:46 +0000 (12:29 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901496 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_request.c

index 52639291ae120f56167e84c089beb5a2d92db628..0dadd4e83c3797f59b80ce56d01353bd8dd7d820 100644 (file)
@@ -252,7 +252,7 @@ static int lua_read_body(request_rec *r, const char **rbuf, apr_off_t *size,
         if (maxsize != 0 && length > maxsize) {
             return APR_EINCOMPLETE; /* Only room for incomplete data chunk :( */
         }
-        *rbuf = (const char *) apr_pcalloc(r->pool, (apr_size_t) (length + 1));
+        *rbuf = (const char *) apr_pcalloc(r->pool, (apr_size_t) (length) + 1);
         while ((rpos < length)
                && (len_read = ap_get_client_block(r, (char *) *rbuf + rpos,
                                                length - rpos)) > 0) {