Skip to content

Commit

Permalink
- ACSE: added check for minimum message size (LIB61850-438)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzillgith committed Mar 27, 2024
1 parent a66e07d commit 7afa403
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/mms/iso_acse/acse.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,14 @@ AcseConnection_parseMessage(AcseConnection* self, ByteBuffer* message)
{
AcseIndication indication = ACSE_ERROR;

if (message == NULL || message->size < 1)
{
if (DEBUG_ACSE)
printf("ACSE: invalid message - no payload\n");

return ACSE_ERROR;
}

uint8_t* buffer = message->buffer;

int messageSize = message->size;
Expand Down

0 comments on commit 7afa403

Please sign in to comment.