From: Eric Covener Date: Wed, 1 Jun 2022 12:31:19 +0000 (+0000) Subject: Merge r1901496 from trunk: X-Git-Tag: 2.4.54-rc1-candidate~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a09953b2439f94714feb03358b793ccbae8a2ca;p=thirdparty%2Fapache%2Fhttpd.git Merge r1901496 from trunk: cast first git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1901498 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index 1eab7b6a47b..a3e3b613bc9 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -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) {