diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-11-02 22:02:46 -0400 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-07-05 08:50:56 +0200 |
commit | 5b9a4d1cfe8bbff9ec6fee00acab3f837613fa2c (patch) | |
tree | 7ae12f0006bbdd80e939e6ef97fe976c61c35884 /src/basic | |
parent | 029a8d2f1459579593cf2fb6f62e5bba360b0a03 (diff) |
Revert some uses of xsprintf
This reverts some changes introduced in d054f0a4d4.
xsprintf should be used in cases where we calculated the right buffer
size by hand (using DECIMAL_STRING_MAX and such), and never in cases where
we are printing externally specified strings of arbitrary length.
Fixes #4534.
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/log.c b/src/basic/log.c index 321c1bd20..d84c9bf11 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -798,7 +798,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; |