From b92042d1cd71d0e4c27f95de0ed3fc064d6e33c6 Mon Sep 17 00:00:00 2001 From: max_10 Date: Sun, 19 Dec 2021 23:12:03 +0100 Subject: [PATCH] glcd: fix possible format-truncation error output between 4 and 14 bytes into a destination of size 6 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3de370c8443d1da597d9f965cb5d2f80da8683fe Author: max_10 Date: 2021-12-19 (Sun, 19 Dec 2021) Origin message was: ------------------ - glcd: fix possible format-truncation error output between 4 and 14 bytes into a destination of size 6 ------------------ This commit was generated by Migit --- src/driver/glcd/glcd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver/glcd/glcd.cpp b/src/driver/glcd/glcd.cpp index 89866bb16..86b119a04 100644 --- a/src/driver/glcd/glcd.cpp +++ b/src/driver/glcd/glcd.cpp @@ -1086,7 +1086,7 @@ void cGLCD::Run(void) if ((info_CurrentNext.current_zeit.dauer > 0) && (info_CurrentNext.current_zeit.dauer < 86400)) { Scale = (ts.tv_sec - info_CurrentNext.current_zeit.startzeit) * 100 / info_CurrentNext.current_zeit.dauer; - char tmp_duration[6] = {0}; + char tmp_duration[15] = {0}; int total = info_CurrentNext.current_zeit.dauer / 60; int done = (abs(time(NULL) - info_CurrentNext.current_zeit.startzeit) + 30) / 60; int todo = total - done;