From b1c54e078032862a964b8077f362ceac0b0949fd Mon Sep 17 00:00:00 2001 From: Niall Mullane Date: Tue, 3 Aug 2021 09:08:58 -0400 Subject: [PATCH] Fix #1751, Add null pointer check --- modules/tbl/fsw/src/cfe_tbl_api.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/tbl/fsw/src/cfe_tbl_api.c b/modules/tbl/fsw/src/cfe_tbl_api.c index c51f7188b..9bac32276 100644 --- a/modules/tbl/fsw/src/cfe_tbl_api.c +++ b/modules/tbl/fsw/src/cfe_tbl_api.c @@ -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; } @@ -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 */