Skip to content

Commit

Permalink
Fix nasa#1466, Fix Address Sanitizer issue in vxworks-console-testrunner
Browse files Browse the repository at this point in the history
Fix nasa#1466, Fix address sanitizer issue in coverage-vxworks-console-testrunner by moving getting the Table only when
it is an valid index.
  • Loading branch information
Anh committed Jun 28, 2024
1 parent 6483329 commit ca022e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/os/vxworks/src/os-impl-console.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ int32 OS_ConsoleCreate_Impl(const OS_object_token_t *token)
int32 return_code;
OS_console_internal_record_t * console;

local = OS_OBJECT_TABLE_GET(OS_impl_console_table, *token);
console = OS_OBJECT_TABLE_GET(OS_console_table, *token);

if (OS_ObjectIndexFromToken(token) == 0)
{
return_code = OS_SUCCESS;

local = OS_OBJECT_TABLE_GET(OS_impl_console_table, *token);
console = OS_OBJECT_TABLE_GET(OS_console_table, *token);

if (console->IsAsync)
{
OS_DEBUG("%s(): Starting Async Console Handler\n", __func__);
Expand Down

0 comments on commit ca022e5

Please sign in to comment.