From 7532a88f9f7048409b3d1cc4bc429ff553090463 Mon Sep 17 00:00:00 2001 From: Anh D Van Date: Wed, 19 Feb 2025 20:40:39 +0000 Subject: [PATCH] Fix #232, Address sanitizer issue Fix #232, set data buffer for CFE_TBL_GetAddress --- unit-test/coveragetest/coveragetest_sample_app_cmds.c | 1 + 1 file changed, 1 insertion(+) diff --git a/unit-test/coveragetest/coveragetest_sample_app_cmds.c b/unit-test/coveragetest/coveragetest_sample_app_cmds.c index 036dbc0..9bee959 100644 --- a/unit-test/coveragetest/coveragetest_sample_app_cmds.c +++ b/unit-test/coveragetest/coveragetest_sample_app_cmds.c @@ -177,6 +177,7 @@ void Test_SAMPLE_APP_ProcessCmd(void) * reporting the table values, and one through the CFE_TBL_ReleaseAddress() * error path. */ + UT_SetDataBuffer(UT_KEY(CFE_TBL_GetAddress), &TblPtr, sizeof(TblPtr), false); UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_SUCCESS); UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_ReleaseAddress), CFE_TBL_ERR_NO_ACCESS); UtAssert_INT32_EQ(SAMPLE_APP_ProcessCmd(&TestMsg), CFE_TBL_ERR_NO_ACCESS);