Current CcbApplyCallback() is not safe, may access NULL pointer
cause SMFD crash and node restart.
---
src/smf/smfd/SmfImmApplierHdl.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/smf/smfd/SmfImmApplierHdl.cc b/src/smf/smfd/SmfImmApplierHdl.cc
index 25b52eb93..cddc27987 100644
--- a/src/smf/smfd/SmfImmApplierHdl.cc
+++ b/src/smf/smfd/SmfImmApplierHdl.cc
@@ -446,14 +446,13 @@ static void CcbApplyCallback(SaImmOiHandleT immOiHandle,
SaImmOiCcbIdT ccbId) {
*/
TRACE("%s: Read value in attributes", __FUNCTION__);
attrMod = opdata->param.modify.attrMods[0];
- attribute = attrMod->modAttr;
for (int i = 1; attrMod != nullptr; i++) {
/* Get the value */
+ attribute = attrMod->modAttr;
if (attribute_name_.compare(attribute.attrName) != 0) {
// Not found
attrMod = opdata->param.modify.attrMods[i];
- attribute = attrMod->modAttr;
continue;
}
--
2.18.0
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel