On 07/19/2013 05:36 AM, Pawit Pornkitprasan 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.pa...@gmail.com> > --- > migration.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/migration.c b/migration.c > index 9f5a423..f3d1ff7 100644 > --- a/migration.c > +++ b/migration.c > @@ -385,8 +385,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) { > error_set(errp, QERR_MIGRATION_ACTIVE); >
Reviewed-by: Orit Wasserman <owass...@redhat.com>