Bump length of description field to 256 chars
Ensure that string always end up \0 terminated, too.
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/stat.c b/stat.c
index c2c717b..f84ce53 100644
--- a/stat.c
+++ b/stat.c
@@ -1232,12 +1232,12 @@
/*
* These are per-group shared already
*/
- strncpy(ts->name, td->o.name, FIO_JOBNAME_SIZE);
+ strncpy(ts->name, td->o.name, FIO_JOBNAME_SIZE - 1);
if (td->o.description)
strncpy(ts->description, td->o.description,
- FIO_JOBNAME_SIZE);
+ FIO_JOBDESC_SIZE - 1);
else
- memset(ts->description, 0, FIO_JOBNAME_SIZE);
+ memset(ts->description, 0, FIO_JOBDESC_SIZE);
/*
* If multiple entries in this group, this is