[patch] LMI_FileIdentity segfaulting

Klaus Kaempf kkaempf at suse.de
Fri Oct 18 11:01:53 UTC 2013


Hi,

playing around with YAWN 
(http://sourceforge.net/apps/mediawiki/pywbem/index.php?title=YAWN)
and sfcb, I discovered a bug in LMI_FileIdentity.

How to reproduce
- sfcb (I'm running 1.4.6)
- openlmi-providers 0.4.0

Go to class list for root/cimv2, get instances of LMI_Baseboard, then
click on "Object Associated with this Instance" -> crash


In logicalfile/file.c, function lmi_check_required checks for the
presence of 'CSCreationClassName' in the passed object path by checking
CMIsNullValue. However, the CSCreationClassName isn't even present in
the passed object path, so the CMPIData state is CMPI_notFound.

But lmi_check_required only tests for CMPI_nullValue via CMIsNullValue
and then happily continues to use the property value.

Proposed fix attached, might be needed at other places too.

Klaus
-- 
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-logicalfile-Prevent-crash-if-CSCreationClassName-or-.patch
Type: text/x-patch
Size: 1547 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/openlmi-devel/attachments/20131018/d8468d48/attachment.bin>


More information about the openlmi-devel mailing list