You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Static code analysis finding from the Klocwork tool. Line numbers based on the draco-rc4 tag. On line 606 in the cfe_es_apps.c file, the function CFE_ES_LocateTaskRecordByID could return a value of NULL. This will then set TaskRecPtr to NULL. Then on line 607 TaskRecPtr will be dereferenced.
To Reproduce
Run Klocwork SCA analysis
Reporter Info
Beth Geist/NASA GSFC
The text was updated successfully, but these errors were encountered:
* As this is a newly-created task, this shouldn't fail.
* The entry is not (yet) matching the task ID - it will be
* initialized here.
*/
LocalTaskId=CFE_ES_TaskId_FromOSAL(OsalTaskId);
Basically - the CFE_ES_TaskId_FromOSAL() call can never fail, it always produces a valid ID, and thus CFE_ES_LocateTaskRecordByID() always returns non-NULL in this context. If we added an "if" to check for it, it would end up being unreachable code.
Describe the bug
Static code analysis finding from the Klocwork tool. Line numbers based on the draco-rc4 tag. On line 606 in the cfe_es_apps.c file, the function CFE_ES_LocateTaskRecordByID could return a value of NULL. This will then set TaskRecPtr to NULL. Then on line 607 TaskRecPtr will be dereferenced.
To Reproduce
Run Klocwork SCA analysis
Reporter Info
Beth Geist/NASA GSFC
The text was updated successfully, but these errors were encountered: