From 6f8ee40d684e4c02211a80c3fa8a8a1e694693af Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Fri, 24 Nov 2017 10:36:04 +0000 Subject: [PATCH] Replace use of snprintf with xsprintf --- src/basic/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/basic/log.c b/src/basic/log.c index 3367f8424..ce96ac443 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -370,7 +370,7 @@ static int write_to_console( highlight = LOG_PRI(level) <= LOG_ERR && show_color; if (show_location) { - snprintf(location, sizeof(location), "(%s:%i) ", file, line); + xsprintf(location, "(%s:%i) ", file, line); iovec[n++] = IOVEC_MAKE_STRING(location); } @@ -813,7 +813,7 @@ static void log_assert( return; DISABLE_WARNING_FORMAT_NONLITERAL; - snprintf(buffer, sizeof buffer, format, text, file, line, func); + xsprintf(buffer, format, text, file, line, func); REENABLE_WARNING; log_abort_msg = buffer; -- 2.30.2