nasa / LC

The Core Flight System (cFS) Limit Checker (LC) application.
Apache License 2.0
30 stars 21 forks source link

Static analysis issues JSC 2.1 #110

Closed chillfig closed 3 months ago

chillfig commented 5 months ago

Checklist (Please check before submitting)

Describe the bug Handful of static analysis issues. This report records the findings from the static analysis to facilitate their tracking.

<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

Source Folder | Source Filename | Source Line | Source Object | Disposition -- | -- | -- | -- | -- Unsafe Functions |   |   |   |   \apps\lc\fsw\src | lc_watch.c | 496 | memcpy | Will Not Fix. Using memcpy to safely copy the float value from LC_MultiType_t to ComparisonValue, preserving bitwise representation. \apps\lc\fsw\src | lc_watch.c | 684 | memcpy | Will Not Fix. Using memcpy to safely copy the float value from LC_MultiType_t to WPFloat, preserving bitwise representation. \apps\lc\fsw\src | lc_watch.c | 685 | memcpy | Will Not Fix. Using memcpy to safely copy the float value from LC_MultiType_t to CompareFloat, preserving bitwise representation. \apps\lc\fsw\src | lc_watch.c | 1024 | memcpy | Will Not Fix. Using memcpy to safely copy the float value from LC_MultiType_t to FloatValue, preserving bitwise representation. \apps\lc\fsw\src | lc_watch.c | 1063 | memcpy | Will Not Fix. Using memcpy to safely copy the uint32 value from LC_MultiType_t to PrintableBits, preserving bitwise representation. Unchecked Array Index |   |   |   |   \apps\lc\fsw\src | lc_cmds.c | 251 | HKIndex | Will Not Fix. HKIndex is derived from TableIndex, ensuring it stays within the bounds of the APResults array. \apps\lc\fsw\src | lc_cmds.c | 179 | HKIndex | Will Not Fix. HKIndex is derived from TableIndex, ensuring it stays within the bounds of the WPResults array.

To Reproduce N/A. These issues were communicated by JSC.

Expected behavior Need to resolve these. Should resolve and/or disposition the higher ranked ones at minimum.

Code snips N/A

System observed on: N/A

Additional context N/A

Reporter Info Imported from JSC 2.1 static analysis