Skip to content

SAMPLE_ProcessCC needs to check return code of CFE_TBL_GetAddress call #28

@jphickey

Description

@jphickey

Describe the bug
The SAMPLE_ProcessCC example calls CFE_TBL_GetAddress() and then immediately proceeds to dereference the pointer, without checking its return code.

To Reproduce
This is primarily evident in unit test, where the CFE_TBL_GetAddress() call can be forced to fail. It outputs a NULL pointer in this case and subsequently segfaults.

Expected behavior
The SAMPLE_ProcessCC() should not attempt to dereference the pointer output of CFE_TBL_GetAddress() unless that function actually returns CFE_SUCCESS

System observed on:
Ubuntu 18.04 LTS 64-bit (when running UT)

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions