From: Peter Xu <peterx@redhat.com>
To: Steve Sistare <steven.sistare@oracle.com>
Cc: qemu-devel@nongnu.org, Juan Quintela <quintela@redhat.com>,
Fabiano Rosas <farosas@suse.de>,
Claudio Fontana <cfontana@suse.de>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH] migration: fix coverity migrate_mode finding
Date: Thu, 4 Jan 2024 12:38:39 +0800 [thread overview]
Message-ID: <ZZY2T_tc51c7g46F@x1n> (raw)
In-Reply-To: <1699907025-215450-1-git-send-email-steven.sistare@oracle.com>
On Mon, Nov 13, 2023 at 12:23:45PM -0800, Steve Sistare wrote:
> Coverity diagnoses a possible out-of-range array index here ...
>
> static GSList *migration_blockers[MIG_MODE__MAX];
>
> fill_source_migration_info() {
> GSList *cur_blocker = migration_blockers[migrate_mode()];
>
> ... because it does not know that MIG_MODE__MAX will never be returned as
> a migration mode. To fix, assert so in migrate_mode().
>
> Fixes: fa3673e497a1 ("migration: per-mode blockers")
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
queued.
--
Peter Xu
prev parent reply other threads:[~2024-01-04 4:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 20:23 [PATCH] migration: fix coverity migrate_mode finding Steve Sistare
2023-11-14 12:21 ` Fabiano Rosas
2024-01-04 4:38 ` Peter Xu [this message]
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=ZZY2T_tc51c7g46F@x1n \
--to=peterx@redhat.com \
--cc=cfontana@suse.de \
--cc=farosas@suse.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=steven.sistare@oracle.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 NNTP newsgroup(s).