From e1a199e8fd4d3a1c54b20446fd5a6de869d76e0b Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Wed, 15 Dec 2021 08:28:11 +0000 Subject: [PATCH] * Improve error handling git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895970 13f79535-47bb-0310-9956-ffa450edef68 --- modules/lua/lua_request.c | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index 5c9a496d68..80fe9fe97e 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);