summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/makefs/mtree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/makefs/mtree.c b/usr.sbin/makefs/mtree.c
index d772bc1..a30d6a1 100644
--- a/usr.sbin/makefs/mtree.c
+++ b/usr.sbin/makefs/mtree.c
@@ -150,7 +150,7 @@ mtree_file_path(fsnode *node)
depth = 0;
rp[depth] = node->name;
- for (pnode = node->parent; pnode && depth < MAKEFS_MAX_TREE_DEPTH;
+ for (pnode = node->parent; pnode && depth < MAKEFS_MAX_TREE_DEPTH - 1;
pnode = pnode->parent) {
if (strcmp(pnode->name, ".") == 0)
break;
OpenPOWER on IntegriCloud