public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: inspect: Fix out of bounds string termination.
@ 2015-06-26  8:43 Patrik Lundquist
  2015-06-26 14:25 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Patrik Lundquist @ 2015-06-26  8:43 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Patrik Lundquist

Signed-off-by: Patrik Lundquist <patrik.lundquist@gmail.com>
---
 cmds-inspect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmds-inspect.c b/cmds-inspect.c
index 053cf8e..aafe37d 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:
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-26 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-26  8:43 [PATCH] btrfs-progs: inspect: Fix out of bounds string termination Patrik Lundquist
2015-06-26 14:25 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox