Skip to content

Commit

Permalink
Merge pull request #2554 from avan989:Fix-2553-address-sanitizer
Browse files Browse the repository at this point in the history
Fix #2553, null value in vsnprintf
  • Loading branch information
dzbaker committed Jul 1, 2024
2 parents d6bfc2f + 9fd5a13 commit 4990c4e
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 4990c4e

Please sign in to comment.