nasa / FM

The Core Flight System (cFS) File Manager (FM) application.
Apache License 2.0
43 stars 25 forks source link

FM_ChildSizeTimeMode doesn't clear FileMode on OS_stat failure #43

Closed skliper closed 2 years ago

skliper commented 2 years ago

Checklist (Please check before submitting)

Describe the bug FileMode could be uninitilized when written if there's an OS_stat failure since it's not cleared: https://github.com/nasa/FM/blob/9210c2d314d3506fb50560d9bc6513c2b7fb4983/fsw/src/fm_child.c#L1587-L1610

To Reproduce Pass in uninitialized FileMode, observe not cleared on OS_stat failure.

Expected behavior Should clear all values.

System observed on: Observation

Additional context Low likelihood of ever seeing this (maybe file deleted between directory read and OS_stat?), and just would write uninitialized data to the output.

Reporter Info Jacob Hageman - NASA/GSFC