diff --git a/apache2/apache2_io.c b/apache2/apache2_io.c index ffc1cef4..26f6b864 100644 --- a/apache2/apache2_io.c +++ b/apache2/apache2_io.c @@ -505,7 +505,7 @@ static void inject_content_to_of_brigade(modsec_rec *msr, ap_filter_t *f) { APR_BRIGADE_INSERT_HEAD(msr->of_brigade, bucket_ci); if (msr->txcfg->debuglog_level >= 9) { - msr_log(msr, 9, "Content Injection: Data reinjected bytes [%d]",msr->stream_output_length); + msr_log(msr, 9, "Content Injection: Data reinjected bytes [%"APR_SIZE_T_FMT"]",msr->stream_output_length); } } diff --git a/apache2/mod_security2.c b/apache2/mod_security2.c index b41f6c5b..5ee72b04 100644 --- a/apache2/mod_security2.c +++ b/apache2/mod_security2.c @@ -859,7 +859,7 @@ static int hook_request_late(request_rec *r) { if(msr->txcfg->stream_inbody_inspection && msr->msc_reqbody_read) { const char *clen = NULL; - clen = apr_psprintf(msr->mp,"%d",msr->stream_input_length); + clen = apr_psprintf(msr->mp,"%"APR_SIZE_T_FMT,msr->stream_input_length); if(clen) apr_table_setn(r->headers_in, "Content-Length",clen); } diff --git a/apache2/msc_reqbody.c b/apache2/msc_reqbody.c index 4879b394..88739c21 100644 --- a/apache2/msc_reqbody.c +++ b/apache2/msc_reqbody.c @@ -411,7 +411,7 @@ static apr_status_t modsecurity_request_body_to_stream(modsec_rec *msr, char **e } if (msr->stream_input_data== NULL) { - *error_msg = apr_psprintf(msr->mp, "Unable to allocate memory to hold request body on stream. Asked for %u bytes.", + *error_msg = apr_psprintf(msr->mp, "Unable to allocate memory to hold request body on stream. Asked for %" APR_SIZE_T_FMT " bytes.", msr->stream_input_length + 1); return -1; }