Skip to content

Commit

Permalink
fix-2553-address-sanitizer-error-in-es_UT
Browse files Browse the repository at this point in the history
Fix #2553, fix test that was passing null value
into vsnprintf
  • Loading branch information
Anh committed Apr 25, 2024
1 parent 28a5820 commit 9fd5a13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/es/ut-coverage/es_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -4554,9 +4554,9 @@ void TestAPI(void)
UT_SetHandlerFunction(UT_KEY(CFE_TIME_Print), ES_UT_FillBuffer, &SysLogBufSize);
UtAssert_VOIDCALL(ES_UT_SysLog_snprintf(SysLogBuf, sizeof(SysLogBuf), "b"));

/* Force a vsnprintf failure */
/* Force a vsnprintf to return 0 */
ES_ResetUnitTest();
UtAssert_VOIDCALL(ES_UT_SysLog_snprintf(SysLogBuf, sizeof(SysLogBuf), NULL));
UtAssert_VOIDCALL(ES_UT_SysLog_snprintf(SysLogBuf, sizeof(SysLogBuf), ""));

/* Test run loop with an application error status */
ES_ResetUnitTest();
Expand Down

0 comments on commit 9fd5a13

Please sign in to comment.