qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/8] qapi: fix NULL pointer dereference


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 1/8] qapi: fix NULL pointer dereference
Date: Fri, 16 Dec 2011 09:05:54 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13

On 12/16/2011 09:03 AM, Paolo Bonzini wrote:
On 12/16/2011 03:56 PM, Anthony Liguori wrote:
I'd really prefer to stick to non-nullable strings as there is no
obvious way to specify NULL in command line options.

We can leave it as the default. A property with a non-null default is implicitly
not nullable, which actually makes some sense. We can model this in
get_string/set_string too.

What are the uses of null in qdev string properties? I know you can't
set a string to null since parse() doesn't have a null syntax. So we're
really just talking about an uninitialized state, right?

Yes. No ROM BAR is an example of a NULL string property.

So it's really filenames and backend names, right? Can we just treat empty strings like NULL? I think all of the various bits handles both the same way.

Regards,

Anthony Liguori


Paolo





reply via email to

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