From: Stefan Eissing Date: Thu, 16 Dec 2021 11:15:47 +0000 (+0000) Subject: Merge r1895970 from trunk: X-Git-Tag: candidate-2.4.52-rc1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07b9768cef6a224d256358c404c6ed5622d8acce;p=thirdparty%2Fapache%2Fhttpd.git Merge r1895970 from trunk: *) mod_lua: Improve error handling git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1896039 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index 67ff432e51f..493b2bb431c 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -410,6 +410,7 @@ static int req_parsebody(lua_State *L) if (end == NULL) break; key = (char *) apr_pcalloc(r->pool, 256); filename = (char *) apr_pcalloc(r->pool, 256); + if (end - crlf <= 8) break; vlen = end - crlf - 8; buffer = (char *) apr_pcalloc(r->pool, vlen+1); memcpy(buffer, crlf + 4, vlen);