Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1751, Add null pointer check to table GetAddresses and ReleaseAddresses #1752

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion modules/tbl/fsw/src/cfe_tbl_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ CFE_Status_t CFE_TBL_GetAddresses(void **TblPtrs[], uint16 NumTables, const CFE_
int32 Status;
CFE_ES_AppId_t ThisAppId;

if (TblPtrs == NULL)
if (TblPtrs == NULL || TblHandles == NULL)
{
return CFE_TBL_BAD_ARGUMENT;
}
Expand Down Expand Up @@ -1120,6 +1120,11 @@ CFE_Status_t CFE_TBL_ReleaseAddresses(uint16 NumTables, const CFE_TBL_Handle_t T
CFE_Status_t Status = CFE_SUCCESS;
uint16 i;

if (TblHandles == NULL)
{
return CFE_TBL_BAD_ARGUMENT;
}

for (i = 0; i < NumTables; i++)
{
/* Continue to get the return status until one returns something other than CFE_SUCCESS */
Expand Down