From 2e9ea0a6773ff2cd0f29a94d42dfc2b688b8517d Mon Sep 17 00:00:00 2001 From: Allan Boll Date: Tue, 29 Aug 2017 23:22:04 -0700 Subject: [PATCH] Avoid use of min-macro, as it is not available in all envs --- apache2/msc_reqbody.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache2/msc_reqbody.c b/apache2/msc_reqbody.c index 77755a9e..ebf4e516 100644 --- a/apache2/msc_reqbody.c +++ b/apache2/msc_reqbody.c @@ -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)