Skip to contentSkip to conversation

btrfs-progs: inspect: Fix out of bounds string termination.

PATCH Applied Patrik Lundquist 2 participants 2 messages Jun 26, 2015 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: inspect: Fix out of bounds string termination.

---
 cmds-inspect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmds-inspect.c +1 -1
index 053cf8e..aafe37d 100644
@@ -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:
Signature · 1 line
2.1.4