]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1901496 from trunk:
authorEric Covener <covener@apache.org>
Wed, 1 Jun 2022 12:31:19 +0000 (12:31 +0000)
committerEric Covener <covener@apache.org>
Wed, 1 Jun 2022 12:31:19 +0000 (12:31 +0000)
cast first

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1901498 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_request.c

index 1eab7b6a47b63deeafbdbbad246535e52fb7786d..a3e3b613bc9e357fcf9db40f00af9fca7a102985 100644 (file)
@@ -251,7 +251,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) {