From: Ruediger Pluem Date: Wed, 15 Dec 2021 08:28:11 +0000 (+0000) Subject: * Improve error handling X-Git-Tag: 2.5.0-alpha2-ci-test-only~644 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1a199e8fd4d3a1c54b20446fd5a6de869d76e0b;p=thirdparty%2Fapache%2Fhttpd.git * Improve error handling git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895970 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index 5c9a496d689..80fe9fe97e2 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);