From bcb7932494ebf9af9d5839500eef2eaf4b5efb46 Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 25 Dec 2023 13:07:36 +0100 Subject: [PATCH] Use correct max size in strftime to avoid possible out of range access --- src/lib/logMsg/logMsg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/logMsg/logMsg.cpp b/src/lib/logMsg/logMsg.cpp index 397faed558..5591e005c0 100644 --- a/src/lib/logMsg/logMsg.cpp +++ b/src/lib/logMsg/logMsg.cpp @@ -2066,7 +2066,7 @@ LmStatus lmFdRegister char dt[128]; int sz; - strftime(dt, 256, "%A %d %h %H:%M:%S %Y", &tmP); + strftime(dt, 128, "%A %d %h %H:%M:%S %Y", &tmP); snprintf(startMsg, sizeof(startMsg), "%s log\n-----------------\nStarted %s\nCleared at ...\n", progName, dt);