nasa / SC

The Core Flight System (cFS) Stored Commands (SC) application.
Apache License 2.0
38 stars 20 forks source link

Static analysis issues JSC 2.1 #140

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 -- | -- | -- | -- | -- Unchecked Array Index |   |   |   |   \apps\sc\fsw\src | sc_app.c | 156 | SC_RTP | Will Not Fix. SC_ATP is 0, within the valid index range of NextCmdTime array, which has 2 elements. \apps\sc\fsw\src | sc_app.c | 155 | SC_ATP | Will Not Fix. SC_RTP is 1, within the valid index range of NextCmdTime array, which has 2 elements. Unchecked Return Value of a Function |   |   |   |   \apps\sc\fsw\src | sc_app.c | 355 | snprintf | Will Not Fix. No need to check snprintf return value; TableName's buffer is large enough to safely hold SC_ATS_CMD_STAT_TABLE_NAME with the added index. \apps\sc\fsw\src | sc_app.c | 392 | snprintf | Will Not Fix. No need to check snprintf return value; TableName's buffer is large enough to safely hold CFE_MISSION_TBL_MAX_NAME_LENGTH with the added table identifiers.

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