nasa / SBN

38 stars 23 forks source link

Bug in `Pack_Time` (fsw/src/sbn_pack.c): Use of uninitialized variable #53

Open Nodraak opened 9 months ago

Nodraak commented 9 months ago

Hi,

Bug: in https://github.com/nasa/SBN/blob/main/fsw/src/sbn_pack.c#L55, D is uninitialized and packed into PackPtr

Solution: the return value from OS_TimeAssembleFromMicroseconds() should be assigned to D.

Root cause: this change introduced the bug.

This bug was found with CPPcheck: Line 24: Uninitialized variable: DataBuf