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 <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/364302 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
4af745126b
commit
9699e32d14
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user