Skip to content

Commit

Permalink
Merge pull request #66 from chillfig/Add_null_term
Browse files Browse the repository at this point in the history
Fix #62, Adds null termination to table name processing
  • Loading branch information
dzbaker authored Mar 16, 2023
2 parents ed72e15 + 33d7df9 commit a249bcf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fsw/src/cs_table_processing.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,8 @@ void CS_ProcessNewTablesDefinitionTable(const CS_Def_Tables_Table_Entry_t *Defin
ResultsEntry->StartAddress = 0; /* this is unknown at this time */
ResultsEntry->TblHandle = TableHandle;
ResultsEntry->IsCSOwner = Owned;
strncpy(ResultsEntry->Name, DefEntry->Name, CFE_TBL_MAX_FULL_NAME_LEN);
CFE_SB_MessageStringGet(ResultsEntry->Name, DefEntry->Name, NULL, sizeof(ResultsEntry->Name),
sizeof(DefEntry->Name));
}
else
{
Expand Down Expand Up @@ -765,7 +766,8 @@ void CS_ProcessNewAppDefinitionTable(const CS_Def_App_Table_Entry_t *DefinitionT
ResultsEntry->ByteOffset = 0;
ResultsEntry->TempChecksumValue = 0;
ResultsEntry->StartAddress = 0; /* this is unknown at this time */
strncpy(ResultsEntry->Name, DefEntry->Name, OS_MAX_API_NAME);
CFE_SB_MessageStringGet(ResultsEntry->Name, DefEntry->Name, NULL, sizeof(ResultsEntry->Name),
sizeof(DefEntry->Name));
}
else
{
Expand Down

0 comments on commit a249bcf

Please sign in to comment.