From 724b3357d908de72253f0b93eb41f0b4ac5df66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 22 Feb 2018 22:03:15 +0100 Subject: Revert "Replace use of snprintf with xsprintf" This reverts commit a7419dbc59da5c8cc9e90b3d96bc947cad91ae16. _All_ changes in that commit were wrong. Fixes #8211. --- src/basic/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/basic') diff --git a/src/basic/log.c b/src/basic/log.c index c0117f692..1c8f6ec66 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -377,7 +377,7 @@ static int write_to_console( highlight = LOG_PRI(level) <= LOG_ERR && show_color; if (show_location) { - xsprintf(location, "(%s:%i) ", file, line); + snprintf(location, sizeof(location), "(%s:%i) ", file, line); iovec[n++] = IOVEC_MAKE_STRING(location); } @@ -816,7 +816,7 @@ static void log_assert( return; DISABLE_WARNING_FORMAT_NONLITERAL; - xsprintf(buffer, format, text, file, line, func); + snprintf(buffer, sizeof buffer, format, text, file, line, func); REENABLE_WARNING; log_abort_msg = buffer; -- cgit v1.2.3