From: Patrik Lundquist <patrik.lundquist@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Patrik Lundquist <patrik.lundquist@gmail.com>
Subject: [PATCH] btrfs-progs: inspect: Fix out of bounds string termination.
Date: Fri, 26 Jun 2015 10:43:56 +0200 [thread overview]
Message-ID: <1435308236-7931-1-git-send-email-patrik.lundquist@gmail.com> (raw)
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
next reply other threads:[~2015-06-26 8:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 8:43 Patrik Lundquist [this message]
2015-06-26 14:25 ` [PATCH] btrfs-progs: inspect: Fix out of bounds string termination David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435308236-7931-1-git-send-email-patrik.lundquist@gmail.com \
--to=patrik.lundquist@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox