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

Fix #14, initialize DirListData with zeros before using #48

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

havencarlson
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
Fix #14, zero out DirListData buffer in FM_ChildDirListFileLoop

Testing performed
Unit testing

Expected behavior changes
DirListData.EntryName won't have garbage values.

System(s) tested on

  • OS: Ubuntu 18.04

Contributor Info - All information REQUIRED for consideration of pull request
Haven Carlson - NASA

fsw/src/fm_child.c Fixed Show fixed Hide fixed
fsw/src/fm_child.c Outdated Show resolved Hide resolved
fsw/src/fm_child.c Fixed Show fixed Hide fixed
@dzbaker dzbaker added this to the Equuleus milestone Aug 25, 2022
@@ -1468,6 +1468,7 @@
strncat(TempName, OS_DIRENTRY_NAME(DirEntry), (OS_MAX_PATH_LEN - PathLength));

/* Populate directory list file entry */
memset(&DirListData, 0, sizeof(DirListData));

Check warning

Code scanning / CodeQL-coding-standard

Unchecked return value

The return value of non-void function [memset](1) is not checked.
@dzbaker dzbaker merged commit cefb238 into nasa:main Sep 1, 2022
@dmknutsen dmknutsen modified the milestones: Equuleus, Draco Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FM Dir List to file doesn't clean buffer
4 participants