From b377ca763a974e1ed1f07365970db361bb79339a Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 11 May 2020 13:58:38 +0200 Subject: [PATCH] cmdlft55xx : Fix buf overrun (gcc 10 error) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/cmdlft55xx.c:2560:43: error: ‘ - (Unknown)’ directive output may be truncated writing 21 bytes into a region of size between 15 and 24 [-Werror=format-truncation=] 2560 | snprintf(retStr, sizeof(buf), "%u - " _RED_("(Unknown)"), id); | ^~~~~~~ src/cmdlft55xx.c:2560:13: note: ‘snprintf’ output between 23 and 32 bytes into a destination of size 25 2560 | snprintf(retStr, sizeof(buf), "%u - " _RED_("(Unknown)"), id); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- client/src/cmdlft55xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdlft55xx.c b/client/src/cmdlft55xx.c index 7f7eccb19..d2c3bea55 100644 --- a/client/src/cmdlft55xx.c +++ b/client/src/cmdlft55xx.c @@ -2538,7 +2538,7 @@ bool AcquireData(uint8_t page, uint8_t block, bool pwdmode, uint32_t password, u } char *GetPskCfStr(uint32_t id, bool q5) { - static char buf[25]; + static char buf[40]; char *retStr = buf; switch (id) { case 0: