diff mbox

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

Message ID 1435308236-7931-1-git-send-email-patrik.lundquist@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Patrik Lundquist June 26, 2015, 8:43 a.m. UTC
Signed-off-by: Patrik Lundquist <patrik.lundquist@gmail.com>
---
 cmds-inspect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Sterba June 26, 2015, 2:25 p.m. UTC | #1
On Fri, Jun 26, 2015 at 10:43:56AM +0200, Patrik Lundquist wrote:
> Signed-off-by: Patrik Lundquist <patrik.lundquist@gmail.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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: