- IEDConnection: check for index out of bounds in ClientReport_getReasonForInclusion

v1.6_develop_417_rbac2
Michael Zillgith 2 years ago
parent c7528975dc
commit 9404622c5a

@ -139,7 +139,7 @@ ClientReport_getRptId(ClientReport self)
ReasonForInclusion
ClientReport_getReasonForInclusion(ClientReport self, int elementIndex)
{
if (self->reasonForInclusion != NULL)
if ((self->reasonForInclusion != NULL) && (elementIndex < self->dataSetSize) && (elementIndex >= 0))
return self->reasonForInclusion[elementIndex];
else
return IEC61850_REASON_NOT_INCLUDED;

Loading…
Cancel
Save