From: John Ferlan Date: Thu, 24 Jan 2013 00:34:47 +0000 (-0500) Subject: vbox: Address false positive for NULL dereference X-Git-Tag: v1.0.2-rc2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f01d3d53b71774ae11b512f1f3ca8ec8dc28aed;p=thirdparty%2Flibvirt.git vbox: Address false positive for NULL dereference 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. --- diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 2b3fa255c4..d2cd0b8c69 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); }