Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion modules/msg/fsw/src/cfe_msg_ccsdsext.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ CFE_Status_t CFE_MSG_GetSystem(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_System_t
return CFE_MSG_BAD_ARGUMENT;
}

*System = (MsgPtr->CCSDS.Ext.SystemId[0] << 8) + MsgPtr->CCSDS.Ext.SystemId[1];
*System = ((uint16)MsgPtr->CCSDS.Ext.SystemId[0] << 8) | MsgPtr->CCSDS.Ext.SystemId[1];

return CFE_SUCCESS;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/msg/fsw/src/cfe_msg_ccsdspri.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ CFE_Status_t CFE_MSG_GetSize(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t *Si
return CFE_MSG_BAD_ARGUMENT;
}

*Size = (MsgPtr->CCSDS.Pri.Length[0] << 8) + MsgPtr->CCSDS.Pri.Length[1] + CFE_MSG_SIZE_OFFSET;
*Size = (((uint16)MsgPtr->CCSDS.Pri.Length[0] << 8) | MsgPtr->CCSDS.Pri.Length[1]) + CFE_MSG_SIZE_OFFSET;

return CFE_SUCCESS;
}
Expand Down
8 changes: 7 additions & 1 deletion modules/msg/fsw/src/cfe_msg_init.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/************************************************************************
/************************************************************************
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2023 United States Government as represented by the
Expand Down Expand Up @@ -41,6 +41,11 @@ CFE_Status_t CFE_MSG_Init(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId, CFE_M
return CFE_MSG_BAD_ARGUMENT;
}

if (Size > CFE_MISSION_SB_MAX_SB_MSG_SIZE)
{
return CFE_MSG_BAD_ARGUMENT;
}

/* Clear and set defaults */
memset(MsgPtr, 0, Size);
CFE_MSG_InitDefaultHdr(MsgPtr);
Expand All @@ -64,3 +69,4 @@ CFE_Status_t CFE_MSG_Init(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId, CFE_M

return status;
}

4 changes: 3 additions & 1 deletion modules/msg/fsw/src/cfe_msg_sechdr_checksum.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/************************************************************************
/************************************************************************
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2023 United States Government as represented by the
Expand Down Expand Up @@ -123,3 +123,5 @@ CFE_Status_t CFE_MSG_ValidateChecksum(const CFE_MSG_Message_t *MsgPtr, bool *IsV

return CFE_SUCCESS;
}


Loading