mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
Avoid use of min-macro, as it is not available in all envs
This commit is contained in:
parent
7fff8938ba
commit
2e9ea0a677
@ -435,7 +435,7 @@ apr_status_t modsecurity_request_body_to_stream(modsec_rec *msr, const char *buf
|
||||
// Is the request body length known beforehand? (requests that are not Transfer-Encoding: chunked)
|
||||
if (msr->request_content_length > 0) {
|
||||
// Use min of Content-Length and SecRequestBodyLimit
|
||||
allocate_length = min(msr->request_content_length, msr->txcfg->reqbody_limit);
|
||||
allocate_length = msr->request_content_length < msr->txcfg->reqbody_limit ? msr->request_content_length : msr->txcfg->reqbody_limit;
|
||||
}
|
||||
else {
|
||||
// We don't know how this request is going to be, so hope for just buflen to begin with (requests that are Transfer-Encoding: chunked)
|
||||
|
Loading…
x
Reference in New Issue
Block a user