From: Arran Cudbard-Bell Date: Mon, 3 Apr 2023 22:19:23 +0000 (-0600) Subject: cf_util: Pass in copy of va_list not original va_list X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c888a3241dcf55f6f10938a14cec9cd46d69eb93;p=thirdparty%2Ffreeradius-server.git cf_util: Pass in copy of va_list not original va_list --- diff --git a/src/lib/server/cf_util.c b/src/lib/server/cf_util.c index 18a5ca75ea..b398a7a51b 100644 --- a/src/lib/server/cf_util.c +++ b/src/lib/server/cf_util.c @@ -1940,7 +1940,7 @@ void _cf_vlog(fr_log_type_t type, CONF_ITEM const *ci, char const *file, int lin if (!ci || !ci->filename || !*ci->filename || (*ci->filename == '<') || (((type == L_DBG) || (type == L_INFO)) && !DEBUG_ENABLED4)) { va_copy(aq, ap); - fr_vlog(LOG_DST, type, file, line, fmt, ap); + fr_vlog(LOG_DST, type, file, line, fmt, aq); va_end(aq); return; } @@ -1953,7 +1953,7 @@ void _cf_vlog(fr_log_type_t type, CONF_ITEM const *ci, char const *file, int lin truncate_filename(&e, &p, &len, ci->filename); va_copy(aq, ap); - msg = fr_vasprintf(NULL, fmt, ap); + msg = fr_vasprintf(NULL, fmt, aq); va_end(aq); fr_log(LOG_DST, type, file, line, "%s%.*s[%d]: %s", e, len, p, ci->lineno, msg);