From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - cov: ensure NULL baton is not dereferenced
Date: Sat, 6 May 2023 20:46:04 +0000 (GMT) [thread overview]
Message-ID: <20230506204604.0EC393858D35@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=871d9f379f79f1969d71b660164efe18515826c2
Commit: 871d9f379f79f1969d71b660164efe18515826c2
Parent: 662020c221fdb3e23c66947f6c81f99a0950744a
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Wed Apr 26 13:37:41 2023 +0200
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Sat May 6 19:22:05 2023 +0200
cov: ensure NULL baton is not dereferenced
---
tools/pvmove_poll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/pvmove_poll.c b/tools/pvmove_poll.c
index 751313cd7..6b3ab4550 100644
--- a/tools/pvmove_poll.c
+++ b/tools/pvmove_poll.c
@@ -20,7 +20,7 @@
static int _is_pvmove_image_removable(struct logical_volume *mimage_lv,
void *baton)
{
- uint32_t mimage_to_remove = *((uint32_t *)baton);
+ uint32_t mimage_to_remove = baton ? *((uint32_t *)baton) : UINT32_MAX;
struct lv_segment *mirror_seg;
if (!(mirror_seg = get_only_segment_using_this_lv(mimage_lv))) {
reply other threads:[~2023-05-06 20:46 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=20230506204604.0EC393858D35@sourceware.org \
--to=zkabelac@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).