Skip to content

Commit

Permalink
Fix #401, use valid size when calling CFE_MSG_Init
Browse files Browse the repository at this point in the history
Use the offset of the payload start, which by definition must include at
least enough space for the primary header.  This ensures that the value
will pass any size check enforced in CFE_MSG_Init.
  • Loading branch information
jphickey committed Jul 25, 2023
1 parent 38cfee8 commit e5fbf9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fsw/src/cf_cfdp_sbintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ CF_Logical_PduBuffer_t *CF_CFDP_MsgOutGet(const CF_Transaction_t *t, bool silent
if (success)
{
CFE_MSG_Init(&CF_AppData.engine.out.msg->Msg,
CFE_SB_ValueToMsgId(CF_AppData.config_table->chan[t->chan_num].mid_output), 0);
CFE_SB_ValueToMsgId(CF_AppData.config_table->chan[t->chan_num].mid_output), offsetof(CF_PduTlmMsg_t, ph));
++CF_AppData.engine.outgoing_counter; /* even if max_outgoing_messages_per_wakeup is 0 (unlimited), it's ok
to inc this */

Expand Down

0 comments on commit e5fbf9e

Please sign in to comment.