Skip to content

Commit

Permalink
Fix #2172, Remove last few uses of sprintf()
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Oct 18, 2022
1 parent f0703a7 commit edc3cae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/cfe_testcase/src/tbl_content_access_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void TestGetReleaseAddresses(void)
TblPtrs[0] = TblPtrsList;
for (int i = 1; i < numValidTbls + 1; i++)
{
sprintf(TblName, "%d", i);
snprintf(TblName, sizeof(TblName), "%d", i);
UtAssert_INT32_EQ(
CFE_TBL_Register(&TblHandles[i], TblName, sizeof(TBL_TEST_Table_t), CFE_TBL_OPT_DEFAULT, NULL),
CFE_SUCCESS);
Expand Down
2 changes: 1 addition & 1 deletion modules/es/fsw/src/cfe_es_cds.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ void CFE_ES_FormCDSName(char *FullCDSName, const char *CDSName, CFE_ES_AppId_t T
AppName[OS_MAX_API_NAME - 1] = '\0';

/* Complete formation of processor specific table name */
sprintf(FullCDSName, "%s.%s", AppName, CDSName);
snprintf(FullCDSName, sizeof(*FullCDSName), "%s.%s", AppName, CDSName);
}

/*----------------------------------------------------------------
Expand Down

0 comments on commit edc3cae

Please sign in to comment.