Skip to content

Commit 2e9ea0a

Browse files
allanrboFelipe Zimmerle
authored and
Felipe Zimmerle
committed
Avoid use of min-macro, as it is not available in all envs
1 parent 7fff893 commit 2e9ea0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apache2/msc_reqbody.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ apr_status_t modsecurity_request_body_to_stream(modsec_rec *msr, const char *buf
435435
// Is the request body length known beforehand? (requests that are not Transfer-Encoding: chunked)
436436
if (msr->request_content_length > 0) {
437437
// Use min of Content-Length and SecRequestBodyLimit
438-
allocate_length = min(msr->request_content_length, msr->txcfg->reqbody_limit);
438+
allocate_length = msr->request_content_length < msr->txcfg->reqbody_limit ? msr->request_content_length : msr->txcfg->reqbody_limit;
439439
}
440440
else {
441441
// 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)

0 commit comments

Comments
 (0)