Description: Improve error handling Author: Stefan Eissing Origin: upstream, https://github.com/apache/httpd/commit/07b9768c Bug: https://security-tracker.debian.org/tracker/CVE-2021-44790 Forwarded: not-needed Reviewed-By: Yadd Last-Update: 2021-12-21 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -376,6 +376,7 @@ 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);