diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-02-22 22:03:15 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-05-30 07:59:04 +0200 |
commit | 724b3357d908de72253f0b93eb41f0b4ac5df66d (patch) | |
tree | af7891ac262eb49722eb67cbfcb262fb6bcddd51 /src | |
parent | a8a2468900dc38304ed053641aa2f6e1cf158da9 (diff) |
Revert "Replace use of snprintf with xsprintf"
This reverts commit a7419dbc59da5c8cc9e90b3d96bc947cad91ae16.
_All_ changes in that commit were wrong.
Fixes #8211.
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/log.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |