You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In function CS101_ASDU_addPayload, if (self->payloadSize + self->asduHeaderLength + size <= 256)...
the max length 256 is ASDU;
In function MessageQueue_enqueueASDU int asduSize = asdu->asduHeaderLength + asdu->payloadSize; if (asduSize > 256 - IEC60870_5_104_APCI_LENGTH) ...
the max length is more little value 250, that IEC60870_5_104_APCI_LENGTH is 6.
for example
I have data which length is 247, when I call CS101_ASDU_addPayload is success because 247+6<256, but when program call MessageQueue_enqueueASDU, asduSize is 247 + 6(asdu->asduHeaderLength) = 253, is bigger than 250(256 - IEC60870_5_104_APCI_LENGTH), so failed.
so I think (self->payloadSize + self->asduHeaderLength + size <= 250) is correct.
The text was updated successfully, but these errors were encountered:
In function CS101_ASDU_addPayload,
if (self->payloadSize + self->asduHeaderLength + size <= 256)...
the max length 256 is ASDU;
In function MessageQueue_enqueueASDU
int asduSize = asdu->asduHeaderLength + asdu->payloadSize;
if (asduSize > 256 - IEC60870_5_104_APCI_LENGTH) ...
the max length is more little value 250, that IEC60870_5_104_APCI_LENGTH is 6.
for example
I have data which length is 247, when I call CS101_ASDU_addPayload is success because 247+6<256, but when program call MessageQueue_enqueueASDU, asduSize is 247 + 6(asdu->asduHeaderLength) = 253, is bigger than 250(256 - IEC60870_5_104_APCI_LENGTH), so failed.
so I think (self->payloadSize + self->asduHeaderLength + size <= 250) is correct.
The text was updated successfully, but these errors were encountered: