]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Improve error handling
authorRuediger Pluem <rpluem@apache.org>
Wed, 15 Dec 2021 08:28:11 +0000 (08:28 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 15 Dec 2021 08:28:11 +0000 (08:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895970 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_request.c

index 5c9a496d689bf016ff3e78254713e10fe0e148e1..80fe9fe97e2e7c528fe16117de02416df651bb6d 100644 (file)
@@ -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);