aboutsummaryrefslogtreecommitdiff
path: root/hugeutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'hugeutils.c')
-rw-r--r--hugeutils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hugeutils.c b/hugeutils.c
index 6a4dc85..53a7fbd 100644
--- a/hugeutils.c
+++ b/hugeutils.c
@@ -665,6 +665,7 @@ static void find_mounts(void)
continue;
strncpy(path, match, end - match);
+ path[end - match] = '\0';
if ((hugetlbfs_test_path(path) == 1) &&
!(access(path, R_OK | W_OK | X_OK)))
add_hugetlbfs_mount(path, 0);