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

OS_SelectFdZero/OS_SelectFdAdd/OS_SelectFdClear/OS_SelectFdIsSet does not ensure Set is != NULL #390

Closed
CDKnightNASA opened this issue Mar 26, 2020 · 1 comment · Fixed by #409 or #433
Assignees
Labels
Milestone

Comments

@CDKnightNASA
Copy link
Contributor

Describe the bug
Users of these API's will cause a seg fault if they call these functions with a null pointer.

To Reproduce
Call OS_SelectFdZero(NULL), etc.

Expected behavior
These API's should return an error code when provided a NULL pointer.

Code snips

int32 OS_SelectFdZero(OS_FdSet *Set)
{  
   memset(Set,0,sizeof(OS_FdSet));
   return OS_SUCCESS;
} /* end OS_SelectFdZero */

System observed on:
Debian 9

Additional context
Add any other context about the problem here.

Reporter Info
[email protected]

@CDKnightNASA CDKnightNASA self-assigned this Mar 26, 2020
CDKnightNASA added a commit to CDKnightNASA/osal that referenced this issue Mar 26, 2020
@skliper skliper added this to the 5.1.0 milestone Mar 26, 2020
@CDKnightNASA CDKnightNASA added bug CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) and removed enhancement labels Mar 26, 2020
@astrogeco
Copy link
Contributor

CCB 2020-04-01 - Discussed, approved implementation as long as it doesn't change API.

@astrogeco astrogeco linked a pull request Apr 1, 2020 that will close this issue
@astrogeco astrogeco added CCB - 20200401 and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels Apr 1, 2020
CDKnightNASA added a commit to CDKnightNASA/osal that referenced this issue Apr 7, 2020
astrogeco added a commit that referenced this issue Apr 21, 2020
Fix #390 and #392, osal select API unit tests and fixes
@astrogeco astrogeco linked a pull request Apr 27, 2020 that will close this issue
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022


Fixes nasa#379, Fixes nasa#380, Fixes nasa#383, Fixes nasa#384,
Fixes nasa#385, Fixes nasa#392
Code reviewed and approved at 20191106 and 20191113 CB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment