- **status**: assigned --> review
- **Component**: unknown --> amf
- **Priority**: major --> minor
---
** [tickets:#719] AMFD: Invalid read when deleting a node from a node group**
**Status:** review
**Created:** Wed Jan 15, 2014 05:35 AM UTC by Gary Lee
**Last Updated:** Thu Jan 16, 2014 02:15 AM UTC
**Owner:** Gary Lee
When deleting a node from a node group, valgrind sometimes reports an invalid
read.
Possible solution:
Ensure we don't try to read beyond our array, if the removed node happens to be
the last element in 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];
~~~~
---
Sent from sourceforge.net because [email protected] is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.------------------------------------------------------------------------------
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-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets