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

Ensure memory is set in OS_stat handler #1210

Closed
skliper opened this issue Jan 18, 2022 · 0 comments · Fixed by #1211
Closed

Ensure memory is set in OS_stat handler #1210

skliper opened this issue Jan 18, 2022 · 0 comments · Fixed by #1211
Assignees
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Jan 18, 2022

Is your feature request related to a problem? Please describe.
Risk of uninitialized variable use if buffer isn't set in OS_stat handler:

if (Status == OS_SUCCESS)
{
UT_Stub_CopyToLocal(UT_KEY(OS_stat), filestats, sizeof(*filestats));
}

Describe the solution you'd like
Initialize to zero if not fully set (provides default behavior)

Describe alternatives you've considered
None

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper added this to the Draco milestone Jan 18, 2022
@skliper skliper self-assigned this Jan 18, 2022
skliper added a commit to skliper/osal that referenced this issue Jan 18, 2022
astrogeco added a commit that referenced this issue Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant