qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qemu-option: Guard against qemu_opts_set_defaul


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] qemu-option: Guard against qemu_opts_set_defaults() misuse
Date: Fri, 02 Aug 2013 07:37:00 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

On 08/02/2013 01:34 AM, Markus Armbruster wrote:
> Commit 6d4cd40 fixed qemu_opts_set_defaults() for an existing corner
> case, but broke it for another one that can't be reached in current
> code.
> 

> 
> Not reachable, because we never pass lists with !list->merge_lists to
> qemu_opts_set_defaults().
> 
> Guard against possible (if unlikely) future misuse with assert().
> 
> Reported-by: Peter Maydell <address@hidden>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  util/qemu-option.c | 9 +++++++++
>  1 file changed, 9 insertions(+)

> +     * This code doesn't work for defaults && !list->merge_lists: when
> +     * params has no id=, and list has an element with !opts->id, it
> +     * appends a new element instead of returning the existing opts.
> +     * However, we got no use for this case.  Guard against possible

s/got/have/

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]