Skip to content

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

@CDKnightNASA

Description

@CDKnightNASA

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]

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions