Hi, Although the change is trivial I have some comments:
- the commit message, it should start off with a verb and describe what the patch is doing e.g. in this case: "amfd: fix out-of-bounds read from nodelist array [#719]" - It seems like the logic in ng_ccb_apply_modify_hdlr can only handle deletion of one node at a time. Either that logic is changed or ng_ccb_completed_modify_hdlr is changed to only allow deletion of one node per CCB. At this point I would prefer to disallow deletes of more than one node at a time. You only have to send a patch for the oldest branch the problem is to be fixed in (unless the code has changed dramatically in later branches). So can you please send an updated patch with comments above incorporated? Thanks, Hans > -----Original Message----- > From: Gary Lee [mailto:[email protected]] > Sent: den 16 januari 2014 06:12 > To: Hans Feldt; Hans Nordebäck; Gary Lee > Cc: [email protected] > Subject: [PATCH 1 of 1] amfd: Invalid read when deleting a node from a node > group [#719] > > osaf/services/saf/amf/amfd/nodegroup.cc | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > > don't read beyond the end of saAmfNGNodeList, if the node to be removed from > node group > is at the end of the array. > > diff --git a/osaf/services/saf/amf/amfd/nodegroup.cc > b/osaf/services/saf/amf/amfd/nodegroup.cc > --- a/osaf/services/saf/amf/amfd/nodegroup.cc > +++ b/osaf/services/saf/amf/amfd/nodegroup.cc > @@ -509,7 +509,7 @@ > > TRACE("found node %s", ng->saAmfNGNodeList[j].value); > > - for (; j < ng->number_nodes; j++) > + for (; j < (ng->number_nodes - 1); j++) > ng->saAmfNGNodeList[j] = ng->saAmfNGNodeList[j > + 1]; > > ng->number_nodes -= mod->modAttr.attrValuesNumber; ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
