From: David Teigland <teigland@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - cov: lvmlockd path copy
Date: Mon, 2 Aug 2021 21:00:12 +0000 (GMT) [thread overview]
Message-ID: <20210802210012.804393853800@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=bf6dfc248a1de0250eebe8229cae40d55c247ddd
Commit: bf6dfc248a1de0250eebe8229cae40d55c247ddd
Parent: d2a2dc2e41b38f1381746ec3aa946cc52d3d8f43
Author: David Teigland <teigland@redhat.com>
AuthorDate: Mon Aug 2 15:49:39 2021 -0500
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Mon Aug 2 15:49:39 2021 -0500
cov: lvmlockd path copy
---
daemons/lvmlockd/lvmlockd-dlm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/daemons/lvmlockd/lvmlockd-dlm.c b/daemons/lvmlockd/lvmlockd-dlm.c
index dc665e0a4..67e7bee03 100644
--- a/daemons/lvmlockd/lvmlockd-dlm.c
+++ b/daemons/lvmlockd/lvmlockd-dlm.c
@@ -790,14 +790,14 @@ int lm_is_running_dlm(void)
int lm_refresh_lv_start_dlm(struct action *act)
{
- char path[PATH_MAX];
+ char path[PATH_MAX] = { 0 };
char command[DLMC_RUN_COMMAND_LEN];
char run_uuid[DLMC_RUN_UUID_LEN];
char *p, *vgname, *lvname;
int rv;
/* split /dev/vgname/lvname into vgname and lvname strings */
- strncpy(path, act->path, strlen(act->path));
+ strncpy(path, act->path, PATH_MAX-1);
/* skip past dev */
p = strchr(path + 1, '/');
reply other threads:[~2021-08-02 21:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210802210012.804393853800@sourceware.org \
--to=teigland@sourceware.org \
--cc=lvm-devel@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.