Verify if nodeId is strictly lesser than subindex entries count at the beginning of send_consise_dcf_loop function
authorgreg
Wed, 14 Oct 2009 16:37:37 +0200
changeset 609 c59dce78bbad
parent 606 15a175f6305d
child 610 485e9b8a3e76
Verify if nodeId is strictly lesser than subindex entries count at the beginning of send_consise_dcf_loop function
src/dcf.c
--- a/src/dcf.c	Thu Oct 08 17:34:44 2009 +0200
+++ b/src/dcf.c	Wed Oct 14 16:37:37 2009 +0200
@@ -118,7 +118,8 @@
 
 static void send_consise_dcf_loop(CO_Data* d,UNS8 nodeId)
 {
-  /* Loop on all DCF subindexes, corresponding to node ID until there is no request*/
+  if(nodeId > d->dcf_odentry->bSubCount) return;
+/* Loop on all DCF subindexes, corresponding to node ID until there is no request*/
   //while (nodeId < d->dcf_odentry->bSubCount){
   while (d->dcf_request>0){
   	if(d->dcf_odentry->pSubindex[nodeId].bAccessType & DCF_TO_SEND){