From da8e3b04db883b2b49b34d614f82028b516ce65d Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Mon, 15 Jun 2020 15:13:39 +0400 Subject: [PATCH] [mod_verto] Fix content length overflow on 32bit --- src/mod/endpoints/mod_verto/mod_verto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c index 0e350bf16f..5d930b4df2 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.c +++ b/src/mod/endpoints/mod_verto/mod_verto.c @@ -1649,7 +1649,7 @@ new_req: goto done; } - if (request->content_length && request->content_length > 5l * 1024 * 1024 * 1024 - 1) { + if (request->content_length && request->content_length > INT32_MAX) { char *data = "HTTP/1.1 413 Request Entity Too Large\r\n" "Content-Length: 0\r\n\r\n"; kws_raw_write(jsock->ws, data, strlen(data));