From: Anthony Liguori <anthony@codemonkey.ws>
To: Kevin Wolf <kwolf@redhat.com>
Cc: xudong.hao@intel.com, qemu-devel@nongnu.org,
morita.kazutaka@lab.ntt.co.jp
Subject: Re: [Qemu-devel] [PATCH] qemu-option: Fix uninitialized value in append_option_parameter
Date: Mon, 14 Jun 2010 11:27:18 -0500 [thread overview]
Message-ID: <4C165866.2050707@codemonkey.ws> (raw)
In-Reply-To: <1276244381-7569-1-git-send-email-kwolf@redhat.com>
On 06/11/2010 03:19 AM, Kevin Wolf wrote:
> When dest is NULL, i.e. a new copy of the list is created, we don't get a
> properly terminated list after the realloc. Initialize it as an empty list.
>
> Signed-off-by: Kevin Wolf<kwolf@redhat.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
>
> Xudong, can you please try this one? I think it should fix your qemu-img
> problem.
>
> qemu-option.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/qemu-option.c b/qemu-option.c
> index acd74f9..f884865 100644
> --- a/qemu-option.c
> +++ b/qemu-option.c
> @@ -378,6 +378,7 @@ QEMUOptionParameter *append_option_parameters(QEMUOptionParameter *dest,
> num_options += count_option_parameters(list);
>
> dest = qemu_realloc(dest, (num_options + 1) * sizeof(QEMUOptionParameter));
> + dest[num_dest_options].name = NULL;
>
> while (list&& list->name) {
> if (get_option_parameter(dest, list->name) == NULL) {
>
prev parent reply other threads:[~2010-06-14 16:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-11 8:19 [Qemu-devel] [PATCH] qemu-option: Fix uninitialized value in append_option_parameter Kevin Wolf
2010-06-11 13:08 ` [Qemu-devel] " Hao, Xudong
2010-06-14 16:27 ` Anthony Liguori [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=4C165866.2050707@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=kwolf@redhat.com \
--cc=morita.kazutaka@lab.ntt.co.jp \
--cc=qemu-devel@nongnu.org \
--cc=xudong.hao@intel.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.