X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Futils%2Flfs_project.c;h=f16d825a4f2bbd63ea297220309b0c7436e2aa6f;hp=55caae5fca266749a3866e6b9631dd2a3ce58bb3;hb=ffef6e3271ad1136d3ab1c2ee229b4690a6722a0;hpb=7babde7afc54712c5e62d8cf47ab2481a0efc598 diff --git a/lustre/utils/lfs_project.c b/lustre/utils/lfs_project.c index 55caae5..f16d825 100644 --- a/lustre/utils/lfs_project.c +++ b/lustre/utils/lfs_project.c @@ -69,7 +69,7 @@ lfs_project_item_alloc(struct list_head *head, const char *pathname) return -ENOMEM; } - strncpy(lpi->lpi_pathname, pathname, sizeof(lpi->lpi_pathname)); + strncpy(lpi->lpi_pathname, pathname, sizeof(lpi->lpi_pathname) - 1); list_add_tail(&lpi->lpi_list, head); return 0;