The following changes since commit 84306c1d9ecd94e93436da62b41ef61ac6e281ac: Windows build fixes (2012-04-16 19:33:03 +0200) are available in the git repository at: git://git.kernel.dk/fio.git master Jens Axboe (1): Fix for crash with more than ~500 jobs eta.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) --- Diff of recent changes: diff --git a/eta.c b/eta.c index 7e837ba..4679a21 100644 --- a/eta.c +++ b/eta.c @@ -360,7 +360,7 @@ void display_thread_status(struct jobs_eta *je) { static int linelen_last; static int eta_good; - char output[512], *p = output; + char output[REAL_MAX_JOBS + 512], *p = output; char eta_str[128]; double perc = 0.0; int i2p = 0; @@ -385,6 +385,7 @@ void display_thread_status(struct jobs_eta *je) char perc_str[32]; char *iops_str[2]; char *rate_str[2]; + size_t left; int l; if ((!je->eta_sec && !eta_good) || je->nr_ramp == je->nr_running) @@ -401,7 +402,9 @@ void display_thread_status(struct jobs_eta *je) iops_str[0] = num2str(je->iops[0], 4, 1, 0); iops_str[1] = num2str(je->iops[1], 4, 1, 0); - l = sprintf(p, ": [%s] [%s] [%s/%s /s] [%s/%s iops] [eta %s]", + left = sizeof(output) - (p - output) - 1; + + l = snprintf(p, left, ": [%s] [%s] [%s/%s /s] [%s/%s iops] [eta %s]", je->run_str, perc_str, rate_str[0], rate_str[1], iops_str[0], iops_str[1], eta_str); p += l; -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html