From 9699e32d14764c9d97bad20963400fd990e458d2 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Tue, 6 Jun 2017 11:15:27 -0700 Subject: [PATCH] ioat/perf: extend buffers to avoid truncation The snprintf() calls could overflow the buffer if i is very large. This is not possible in reality since there are only a few I/OAT channels on real systems, but it fixes a GCC 7 warning. Change-Id: Ia202872135cc538120e17be2c76e16b687f3ee37 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/364302 Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker --- examples/ioat/perf/perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ioat/perf/perf.c b/examples/ioat/perf/perf.c index 4421c0a4c..bee9bbc04 100644 --- a/examples/ioat/perf/perf.c +++ b/examples/ioat/perf/perf.c @@ -456,7 +456,7 @@ associate_workers_with_chan(void) struct spdk_ioat_chan *chan = get_next_chan(); struct worker_thread *worker = g_workers; struct ioat_chan_entry *t; - char buf_pool_name[20], task_pool_name[20]; + char buf_pool_name[30], task_pool_name[30]; int i = 0; while (chan != NULL) {