-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
Checklist (Please check before submitting)
- I reviewed the Contributing Guide.
- I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.
Describe the bug
Pathname is only set when move is not empty, but the copy is done outside that condition:
Lines 891 to 906 in 733b2b2
| char PathName[DS_TOTAL_FNAME_BUFSIZE]; | |
| /* | |
| ** First, close the file... | |
| */ | |
| OS_close(FileStatus->FileHandle); | |
| /* | |
| ** Move file only if table has a downlink directory name... | |
| */ | |
| if (DS_AppData.DestFileTblPtr->File[FileIndex].Movename[0] != '\0') | |
| { | |
| /* | |
| ** Make sure directory name does not end with slash character... | |
| */ | |
| strcpy(PathName, DS_AppData.DestFileTblPtr->File[FileIndex].Movename); |
Line 968 in 733b2b2
| strncpy(FileStatus->FileName, PathName, sizeof(PathName)); |
To Reproduce
Produce the packet with move empty
Expected behavior
Only copy over if Pathname was set
System observed on:
Observed, also flagged by static analysis
Additional context
Introduced with file complete tlm packet updates - #39, so doesn't impact draco-rc2
Reporter Info
Jacob Hageman - NASA/GSFC