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

John Ferlan jferlan at redhat.com
Thu Jan 24 00:34:47 UTC 2013


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);
     nsIDFromChar(iid->value, uuid);
 }
 
-- 
1.7.11.7




More information about the libvir-list mailing list