--- a/src/dcf.c Tue Aug 30 12:14:34 2011 +0200
+++ b/src/dcf.c Mon Sep 12 10:52:02 2011 +0200
@@ -97,7 +97,7 @@
/* If DCF entry do not exist... Nothing to do.*/
if (errorCode != OD_SUCCESSFUL) goto DCF_finish;
}
-
+ if(d->dcf_odentry->bSubCount<=nodeId) goto DCF_finish; /* Fix DCF table overflow */
szData = d->dcf_odentry->pSubindex[nodeId].size;
/* if the entry for the nodeId is not empty. */
--- a/src/lifegrd.c Tue Aug 30 12:14:34 2011 +0200
+++ b/src/lifegrd.c Mon Sep 12 10:52:02 2011 +0200
@@ -56,7 +56,11 @@
**/
e_nodeState getNodeState (CO_Data* d, UNS8 nodeId)
{
- e_nodeState networkNodeState = d->NMTable[nodeId];
+ e_nodeState networkNodeState = Unknown_state;
+ #if NMT_MAX_NODE_ID>0
+ if(nodeId < NMT_MAX_NODE_ID)
+ networkNodeState = d->NMTable[nodeId];
+ #endif
return networkNodeState;
}
--- a/src/states.c Tue Aug 30 12:14:34 2011 +0200
+++ b/src/states.c Mon Sep 12 10:52:02 2011 +0200
@@ -100,6 +100,7 @@
{
proceedNMTstateChange(d,m);
}
+ break;
#ifdef CO_ENABLE_LSS
case LSS:
if (!d->CurrentCommunicationState.csLSS)break;