Hi, I see that this is already pushed. The fix seems correct.
Thanks Lennart > -----Original Message----- > From: thuan.tran <thuan.t...@dektech.com.au> > Sent: den 17 september 2018 13:39 > To: Lennart Lund <lennart.l...@ericsson.com>; Gary Lee > <gary....@dektech.com.au> > Cc: opensaf-devel@lists.sourceforge.net; Thuan Tran > <thuan.t...@dektech.com.au> > Subject: [PATCH 1/1] smf: improve CcbApplyCallback() to avoid NULL access > [#2927] > > 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 Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel