Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions fsw/src/ci_lab_passthru_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ CFE_Status_t CI_LAB_DecodeInputMessage(void *SourceBuffer, size_t SourceSize, CF
else
{
MsgBufPtr = SourceBuffer;
MsgSize = 0;

/* Check the size from within the header itself, compare against network buffer size */
CFE_MSG_GetSize(&MsgBufPtr->Msg, &MsgSize);
Status = CFE_MSG_GetSize(&MsgBufPtr->Msg, &MsgSize);

if (MsgSize > SourceSize)
if ((Status == CFE_SUCCESS) && (MsgSize > SourceSize))
{
Status = CFE_STATUS_WRONG_MSG_LENGTH;

Expand All @@ -106,10 +107,6 @@ CFE_Status_t CI_LAB_DecodeInputMessage(void *SourceBuffer, size_t SourceSize, CF
(unsigned long)MsgSize,
(unsigned long)SourceSize);
}
else
{
Status = CFE_SUCCESS;
}
}

*DestBufferOut = MsgBufPtr;
Expand Down
Loading