From: Luiz Capitulino <lcapitulino@redhat.com>
To: Pawit Pornkitprasan <p.pawit@gmail.com>
Cc: Ryousei Takano <takano-ryousei@aist.go.jp>,
qemu-devel@nongnu.org, Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] migration: don't use uninitialized variables
Date: Tue, 30 Jul 2013 09:31:13 -0400 [thread overview]
Message-ID: <20130730093113.43352e1b@redhat.com> (raw)
In-Reply-To: <1375141192-1121-1-git-send-email-p.pawit@gmail.com>
On Tue, 30 Jul 2013 08:39:52 +0900
Pawit Pornkitprasan <p.pawit@gmail.com> wrote:
> The qmp_migrate method uses the 'blk' and 'inc' parameter without
> checking if they're valid or not (they may be uninitialized if
> command is received via QMP)
>
> Signed-off-by: Pawit Pornkitprasan <p.pawit@gmail.com>
Applied to the qmp branch, thanks.
> ---
> migration.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/migration.c b/migration.c
> index 9fc7294..57a7998 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -399,8 +399,8 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
> MigrationParams params;
> const char *p;
>
> - params.blk = blk;
> - params.shared = inc;
> + params.blk = has_blk && blk;
> + params.shared = has_inc && inc;
>
> if (s->state == MIG_STATE_ACTIVE || s->state == MIG_STATE_SETUP) {
> error_set(errp, QERR_MIGRATION_ACTIVE);
prev parent reply other threads:[~2013-07-30 13:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 23:39 [Qemu-devel] [PATCH v2] migration: don't use uninitialized variables Pawit Pornkitprasan
2013-07-30 12:34 ` Eric Blake
2013-07-30 13:31 ` Luiz Capitulino [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=20130730093113.43352e1b@redhat.com \
--to=lcapitulino@redhat.com \
--cc=p.pawit@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=takano-ryousei@aist.go.jp \
/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.