diff options
author | Jens Axboe <axboe@fb.com> | 2014-04-11 11:32:49 -0600 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-04-11 11:32:49 -0600 |
commit | 18ef0638590c8baf153d93ab7a6da7f85d07b6ef (patch) | |
tree | 38e4bc7435d9c83e682b783d546bc0923b3f3535 | |
parent | f0cc675fd0a5902f3637a91024082d2d24a665a7 (diff) | |
download | fio-18ef0638590c8baf153d93ab7a6da7f85d07b6ef.tar.gz |
Fix potentially unterminated string after strncpy() call
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | diskutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -297,7 +297,7 @@ static struct disk_util *disk_util_add(struct thread_data *td, int majdev, sfree(du); return NULL; } - strncpy((char *) du->dus.name, basename(path), FIO_DU_NAME_SZ); + strncpy((char *) du->dus.name, basename(path) - 1, FIO_DU_NAME_SZ); du->sysfs_root = path; du->major = majdev; du->minor = mindev; |