summaryrefslogtreecommitdiff
path: root/cmds-inspect.c
diff options
context:
space:
mode:
authorPatrik Lundquist <patrik.lundquist@gmail.com>2015-06-26 10:43:56 +0200
committerDavid Sterba <dsterba@suse.cz>2015-06-26 16:25:39 +0200
commitd26edf000c83f48a7aaa05ff24e6ebad9a76bd5d (patch)
tree28d864013a845a14747eaf03046e45a3be5bed70 /cmds-inspect.c
parentb681e2536ec8f03a7d25de68f52ddd03ca5de845 (diff)
btrfs-progs: inspect: Fix out of bounds string termination.
Signed-off-by: Patrik Lundquist <patrik.lundquist@gmail.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-inspect.c')
-rw-r--r--cmds-inspect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-inspect.c b/cmds-inspect.c
index 053cf8e..71451fe 100644
--- a/cmds-inspect.c
+++ b/cmds-inspect.c
@@ -293,7 +293,7 @@ static int cmd_subvolid_resolve(int argc, char **argv)
goto out;
}
- path[PATH_MAX] = '\0';
+ path[PATH_MAX - 1] = '\0';
printf("%s\n", path);
out: