Revert "Replace use of snprintf with xsprintf"

This reverts commit a7419dbc59.

_All_ changes in that commit were wrong.

Fixes #8211.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-02-23 00:13:52 +01:00
parent e8a3144ec4
commit f810b631cd
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -365,7 +365,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);
}
@@ -800,7 +800,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;