From b15103ef4edd72c41a80ae58bd1dd0475e35aa04 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 20 Aug 2018 17:29:35 +0200 Subject: [PATCH] log: Make sure the buffer for date is big enough src/log.c:71:32: error: '%06ld' directive output may be truncated writing between 6 and 20 bytes into a region of size between 0 and 63 [-Werror=format-truncation=] snprintf(buf, len, "%s.%06ld", tbuf, (long)tv.tv_usec); Signed-off-by: Andreas Schneider (cherry picked from commit 6766b0a860982790c121f589de8dd5be1b4761c6) --- src/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/log.c b/src/log.c index 39635cc1..a8664b16 100644 --- a/src/log.c +++ b/src/log.c @@ -81,7 +81,7 @@ static void ssh_log_stderr(int verbosity, const char *function, const char *buffer) { - char date[64] = {0}; + char date[128] = {0}; int rc; rc = current_timestring(1, date, sizeof(date));