Skip to content

Commit

Permalink
HOTFIX - Reset va list in OS_printf stub
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Jan 21, 2021
1 parent 86b13a2 commit 33738d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ut-stubs/osapi-utstub-printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,14 @@ void OS_printf(const char *string, ...)
va_list va;
char str[128];

/* Output the message when in debug mode */
va_start(va, string);

vsnprintf(str, sizeof(str), string, va);
UtDebug("OS_printf: %s", str);
va_end(va);

/* Reset va list for next use */
va_start(va, string);

status = UT_DefaultStubImplWithArgs(__func__, UT_KEY(OS_printf), 0, va);

Expand Down

0 comments on commit 33738d0

Please sign in to comment.