[libvirt] [PATCH 1/2] vbox: Address false positive for NULL dereference

Eric Blake eblake at redhat.com
Fri Jan 25 23:02:03 UTC 2013


On 01/23/2013 05:34 PM, John Ferlan wrote:
> Resolve a false positive from 'vboxIIDFromUUID_v2_x()'. The code sets
> 'iid->value = &iid->backing' unconditionally prior to calling 'nsIDFromChar()'.
> The 'vboxIIDUnalloc_v2_x()' checks iid->value to not be &iid->backing. The
> iid->backing is a static buffer within the initialized structure.
> ---
>  src/vbox/vbox_tmpl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
> index 2b3fa25..d2cd0b8 100644
> --- a/src/vbox/vbox_tmpl.c
> +++ b/src/vbox/vbox_tmpl.c
> @@ -444,6 +444,7 @@ vboxIIDFromUUID_v2_x(vboxGlobalData *data, vboxIID_v2_x *iid,
>  
>      iid->value = &iid->backing;
>  
> +    sa_assert(iid->value);

I don't know why Coverity complained on this one (might be worth raising
it as a bug), but as the comment is harmless, I see no reason to avoid it.

ACK and pushed.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130125/d876e193/attachment-0001.sig>


More information about the libvir-list mailing list