Skip to content

Commit

Permalink
Merge pull request #1752 from nmullane/fix1751-missing-null-pointer-c…
Browse files Browse the repository at this point in the history
…heck-in-get-release-addresses

Fix #1751, Add null pointer check to table GetAddresses and ReleaseAddresses
  • Loading branch information
astrogeco authored Aug 4, 2021
2 parents c4ae5b2 + b1c54e0 commit a1a3a1c
Showing 1 changed file with 6 additions and 1 deletion.
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

0 comments on commit a1a3a1c

Please sign in to comment.