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
CFE_TBL_GetAddresses does not check that the array of TblHandles is not NULL and will cause a segmentation fault. A similar issue appears to also exist in CFE_TBL_ReleaseAddresses.
To Reproduce
Steps to reproduce the behavior:
The following line from my fork for Add table api functional tests #1734 will cause a segmentation fault instead of gracefully returning a CFE_TBL_BAD_ARGUMENT UtAssert_INT32_EQ(CFE_TBL_GetAddresses((void ***)&TblPtrs, numValidTbls, NULL), CFE_TBL_BAD_ARGUMENT);
Whereas when the input TblPtrs is NULL, CFE_TBL_BAD_ARGUMENT is correctly returned.
Similarly the following line will cause a segmentation fault from CFE_TBL_ReleaseAddresses UtAssert_INT32_EQ(CFE_TBL_ReleaseAddresses(numValidTbls, NULL), CFE_TBL_BAD_ARGUMENT);
Expected behavior
CFE_TBL_GetAddresses should return CFE_TBL_BAD_ARGUMENT when the pointer TblHandles is NULL.
CFE_TBL_ReleaseAddresses should return CFE_TBL_BAD_ARGUMENT when the pointer TblHandles is NULL.
System observed on:
Hardware: PC
OS: Ubuntu 20.04
Reporter Info
Niall Mullane - GSFC 582 Intern
The text was updated successfully, but these errors were encountered:
Describe the bug
CFE_TBL_GetAddresses does not check that the array of TblHandles is not NULL and will cause a segmentation fault. A similar issue appears to also exist in CFE_TBL_ReleaseAddresses.
To Reproduce
Steps to reproduce the behavior:
UtAssert_INT32_EQ(CFE_TBL_GetAddresses((void ***)&TblPtrs, numValidTbls, NULL), CFE_TBL_BAD_ARGUMENT);
Whereas when the input TblPtrs is NULL, CFE_TBL_BAD_ARGUMENT is correctly returned.
UtAssert_INT32_EQ(CFE_TBL_ReleaseAddresses(numValidTbls, NULL), CFE_TBL_BAD_ARGUMENT);
Expected behavior
System observed on:
Reporter Info
Niall Mullane - GSFC 582 Intern
The text was updated successfully, but these errors were encountered: