- added check for PDU size with security extension

v1.6_develop_329_GOOSE_signatures
Michael Zillgith 1 year ago
parent 90deddf6e8
commit 58518750e7

@ -1022,6 +1022,13 @@ parseGooseMessage(GooseReceiver self, uint8_t* buffer, int numbytes)
{ {
printf("CRC check - FAILED (expected: %04x actual: %04x)\n", secExtCrc, crc); printf("CRC check - FAILED (expected: %04x actual: %04x)\n", secExtCrc, crc);
} }
/* verify correct lenght of message including security extension */
if (numbytes < length + headerLength + secExtLength) {
//if (DEBUG_GOOSE_SUBSCRIBER)
printf("GOOSE_SUBSCRIBER: Invalid PDU size (security extension is missing)\n");
return;
}
} }
/* check if there is an interested subscriber */ /* check if there is an interested subscriber */

Loading…
Cancel
Save