From 318b945706c2ade88785cb1d545ee03f2faf7946 Mon Sep 17 00:00:00 2001 From: Sitsofe Wheeler Date: Sat, 23 Dec 2017 08:01:01 +0000 Subject: [PATCH] eta: fix run_str_condensed overflow with maximum jobs When the maximum number of jobs all have a different state to their previous job, run_str didn't have space for the terminating null. Fix this by making run_str one character larger. Signed-off-by: Sitsofe Wheeler --- eta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eta.c b/eta.c index a156559f..c9b2e913 100644 --- a/eta.c +++ b/eta.c @@ -9,7 +9,7 @@ #include "lib/pow2.h" static char __run_str[REAL_MAX_JOBS + 1]; -static char run_str[__THREAD_RUNSTR_SZ(REAL_MAX_JOBS)]; +static char run_str[__THREAD_RUNSTR_SZ(REAL_MAX_JOBS) + 1]; static void update_condensed_str(char *rstr, char *run_str_condensed) { -- 2.25.1