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

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

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]