Created attachment 656789 [details] Experimental patch Description of problem: I have a CMPI provider, which calls CMPIBroker->getInstance(). The call returns CMPIInstance 'i' with several properties, one of them is uint16[] with "empty array" value, i.e. it's not Null and its size is 0. But i->ft->getPropertyAt() returns Null instead of empty array. Version-Release number of selected component (if applicable): tog-pegasus-2.12.0-2.fc18.x86_64 Looking at Pegasus implementation of getPropertyAt: SCMO_RC src = inst->getPropertyAt((Uint32)pos, &pName, type, &value, isArray, size); After the above call: value = NULL, isArray == true, size == 0, i.e. everything is fine. Following code is then executed: switch(src) { case SCMO_OK: { CMPIType ct=type2CMPIType(type, isArray); CMPISCMOUtilities::scmoValue2CMPIData(value, ct, &data, size); if ((ct&~CMPI_ARRAY) == CMPI_string) { // We always receive strings as an array of pointers // with at least one element, which needs to be released // after it was converted to CMPIData free((void*)value); } break; Since value == NULL, CMPISCMOUtilities::scmoValue2CMPIData() sets data->state to CMPI_nullValue, which is wrong. It should set it to empty array! Attached patch fixes the behavior for me.
tog-pegasus-2.12.0-4.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/tog-pegasus-2.12.0-4.fc18
Package tog-pegasus-2.12.0-4.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing tog-pegasus-2.12.0-4.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-0401/tog-pegasus-2.12.0-4.fc18 then log in and leave karma (feedback).
tog-pegasus-2.12.0-4.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.