Skip to content

Commit

Permalink
Merge pull request #108 from pepepr08/94-strncpy-fix
Browse files Browse the repository at this point in the history
Fix #94, Use sizeof destination instead of source
  • Loading branch information
dzbaker authored May 4, 2023
2 parents 6418164 + ef54ecd commit 6418e20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fsw/src/ds_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ void DS_FileCloseDest(int32 FileIndex)
}

/* Update the path name for reporting */
strncpy(FileStatus->FileName, PathName, sizeof(PathName));
strncpy(FileStatus->FileName, PathName, sizeof(FileStatus->FileName));
}
#else
/*
Expand Down

0 comments on commit 6418e20

Please sign in to comment.