Can't it be considered a bug then?
/Hans

From: Nagendra Kumar [mailto:[email protected]]
Sent: den 13 juni 2014 08:54
To: [opensaf:tickets]
Subject: [opensaf:tickets] #719 AMFD: Invalid read when deleting a node from a 
node group


Newly introduced restriction on AMF as part of fix #719, which prevents 
deletion of more than one node in ng in same CCB.

NO safApp=safAmfService "CCB 5 validation error: ng modify: cannot delete more 
than one node from a node group in a CCB.

This behavior change has to be documented and explained for the components to 
adapt to new behavior.

I can add the below line in 2.2.5 Implementation Notes :

Removing more than one values from attribute saAmfNGNodeList of an object of 
class "SaAmfNodeGroup" is not supported in one Ccb modify operation.

________________________________

[tickets:#719]<http://sourceforge.net/p/opensaf/tickets/719/> AMFD: Invalid 
read when deleting a node from a node group

Status: fixed
Milestone: 4.4.RC1
Created: Wed Jan 15, 2014 05:35 AM UTC by Gary Lee
Last Updated: Tue Feb 04, 2014 08:58 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 you indicated interest in 
https://sourceforge.net/p/opensaf/tickets/719/

To unsubscribe from further messages, please visit 
https://sourceforge.net/auth/subscriptions/



---

** [tickets:#719] AMFD: Invalid read when deleting a node from a node group**

**Status:** fixed
**Milestone:** 4.4.RC1
**Created:** Wed Jan 15, 2014 05:35 AM UTC by Gary Lee
**Last Updated:** Fri Jun 13, 2014 06:53 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 http://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
http://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to