WindhoverLabs / airliner

7 stars 3 forks source link

Ut_CFE_ES_WriteToSysLog() passed wrong parameter to UtList_Add() #341

Open ynielson opened 1 year ago

ynielson commented 1 year ago

When the Ut function, Ut_CFE_ES_WriteToSysLog(), is called, it passed the wrong second parameter in the function, UtList_Add().

void UtList_Add(UtListHead_t ListHead, void Data, uint32 DataSize, uint32 Tag)

The UtList_Add function takes the second parameter as (void ) type and uses it to call the function, memcpy, as a source memory(void ).

But the Ut_CFE_ES_WriteToSysLog() passed the second parameter as (char **) by passing "&SysLogEntryTextCopy".

This can cause memory corruption in some cases.