Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #62, Adds null termination to table name processing #66

Merged
merged 1 commit into from
Mar 16, 2023
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
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