memset(&p, 0, sizeof(p));
- strncpy(p.ts.name, ts->name, FIO_JOBNAME_SIZE - 1);
- strncpy(p.ts.verror, ts->verror, FIO_VERROR_SIZE - 1);
- strncpy(p.ts.description, ts->description, FIO_JOBDESC_SIZE - 1);
+ strncpy(p.ts.name, ts->name, FIO_JOBNAME_SIZE);
+ p.ts.name[FIO_JOBNAME_SIZE - 1] = '\0';
+ strncpy(p.ts.verror, ts->verror, FIO_VERROR_SIZE);
+ p.ts.verror[FIO_VERROR_SIZE - 1] = '\0';
+ strncpy(p.ts.description, ts->description, FIO_JOBDESC_SIZE);
+ p.ts.description[FIO_JOBDESC_SIZE - 1] = '\0';
p.ts.error = cpu_to_le32(ts->error);
p.ts.thread_number = cpu_to_le32(ts->thread_number);