From: Sitsofe Wheeler Date: Sat, 23 Dec 2017 08:01:01 +0000 (+0000) Subject: eta: fix run_str_condensed overflow with maximum jobs X-Git-Tag: fio-3.4~35^2~3 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=318b945706c2ade88785cb1d545ee03f2faf7946;p=fio.git 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 --- 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) {