Skip to content

Commit

Permalink
Fix #14, initialize DirListData with zeros before using
Browse files Browse the repository at this point in the history
  • Loading branch information
havencarlson committed Aug 25, 2022
1 parent 15f3b1c commit 6cdd00d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fsw/src/fm_child.c
Original file line number Diff line number Diff line change
Expand Up @@ -1468,6 +1468,7 @@ void FM_ChildDirListFileLoop(osal_id_t DirId, osal_id_t FileHandle, const char *
strncat(TempName, OS_DIRENTRY_NAME(DirEntry), (OS_MAX_PATH_LEN - PathLength));

/* Populate directory list file entry */
memset(&DirListData, 0, sizeof(DirListData));
strncpy(DirListData.EntryName, OS_DIRENTRY_NAME(DirEntry), EntryLength);
DirListData.EntryName[EntryLength] = '\0';

Expand Down

0 comments on commit 6cdd00d

Please sign in to comment.