X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=filesetup.c;h=17fa31fb3cd48924be886d55569b7c1356e72faf;hp=24e6fb0757d84d3ceafb21a18cd12b5016af8307;hb=554461db6d57df00766e2c4cc7d18f1561d2fa4b;hpb=afc22c98609ee80a99fbed24231181bdab2bc659 diff --git a/filesetup.c b/filesetup.c index 24e6fb07..17fa31fb 100644 --- a/filesetup.c +++ b/filesetup.c @@ -829,7 +829,8 @@ static unsigned long long get_fs_free_counts(struct thread_data *td) continue; fm = calloc(1, sizeof(*fm)); - strncpy(fm->__base, buf, sizeof(fm->__base) - 1); + strncpy(fm->__base, buf, sizeof(fm->__base)); + fm->__base[255] = '\0'; fm->base = basename(fm->__base); fm->key = sb.st_dev; flist_add(&fm->list, &list);