All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Michal Privoznik <mprivozn@redhat.com>, qemu-devel@nongnu.org
Cc: stefanha@redhat.com, marcel.a@redhat.com
Subject: Re: [Qemu-devel] [PATCH] qemu_opt_get_bool_helper: Fix option handling
Date: Thu, 08 Jan 2015 18:14:51 +0100	[thread overview]
Message-ID: <54AEBB0B.7090801@redhat.com> (raw)
In-Reply-To: <f8d51d0ff71937c0aacf37c7c811adad82038697.1420733318.git.mprivozn@redhat.com>



On 08/01/2015 17:09, Michal Privoznik wrote:
> diff --git a/util/qemu-option.c b/util/qemu-option.c
> index a708241..478420f 100644
> --- a/util/qemu-option.c
> +++ b/util/qemu-option.c
> @@ -384,7 +384,6 @@ static bool qemu_opt_get_bool_helper(QemuOpts *opts, const char *name,
>          }
>          return ret;
>      }
> -    assert(opt->desc && opt->desc->type == QEMU_OPT_BOOL);
>      ret = opt->value.boolean;
>      if (del) {
>          qemu_opt_del_all(opts, name);
> 

opt->value.boolean is not initialized correctly if opt->desc is NULL.
See how it is assigned in qemu_opt_parse.

Paolo

      parent reply	other threads:[~2015-01-08 17:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08 16:09 [Qemu-devel] [PATCH] qemu_opt_get_bool_helper: Fix option handling Michal Privoznik
2015-01-08 16:39 ` Eric Blake
2015-01-08 16:44 ` Marcel Apfelbaum
2015-01-08 17:14 ` Paolo Bonzini [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=54AEBB0B.7090801@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=marcel.a@redhat.com \
    --cc=mprivozn@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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.