From e7f029b55aa11a4ac4536adf6003dc127bee4582 Mon Sep 17 00:00:00 2001 From: arminabf Date: Mon, 26 Sep 2016 12:03:50 +0200 Subject: [PATCH] fix error message both info->format and fmt (for versions prio 2.4) contain the error message format but not the actual formatted error message --- apache2/mod_security2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apache2/mod_security2.c b/apache2/mod_security2.c index 14e9f442..ffb450b4 100644 --- a/apache2/mod_security2.c +++ b/apache2/mod_security2.c @@ -1144,13 +1144,13 @@ static void hook_error_log(const char *file, int line, int level, apr_status_t s em->line = info->line; em->level = info->level; em->status = info->status; - if (info->format != NULL) em->message = apr_pstrdup(msr->mp, info->format); + em->message = apr_pstrdup(msr->mp, errstr); #else if (file != NULL) em->file = apr_pstrdup(msr->mp, file); em->line = line; em->level = level; em->status = status; - if (fmt != NULL) em->message = apr_pstrdup(msr->mp, fmt); + em->message = apr_pstrdup(msr->mp, errstr); #endif /* Remove \n from the end of the message */ if (em->message != NULL) {