]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
cf_util: Pass in copy of va_list not original va_list
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 3 Apr 2023 22:19:23 +0000 (16:19 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 3 Apr 2023 22:19:23 +0000 (16:19 -0600)
src/lib/server/cf_util.c

index 18a5ca75ead8ccc094c4bde761e7e9d785ceaf99..b398a7a51b835e555f2248599f3dc3330a5aad2e 100644 (file)
@@ -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);