[mod_verto] Fix content length overflow on 32bit

This commit is contained in:
Andrey Volk 2020-06-15 15:13:39 +04:00
parent 2a676f2743
commit 933a409ff6

View File

@ -1649,7 +1649,7 @@ new_req:
goto done; 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" char *data = "HTTP/1.1 413 Request Entity Too Large\r\n"
"Content-Length: 0\r\n\r\n"; "Content-Length: 0\r\n\r\n";
kws_raw_write(jsock->ws, data, strlen(data)); kws_raw_write(jsock->ws, data, strlen(data));