Checklist (Please check before submitting)
Describe the bug
Bring in secure static code analysis updates from lunar gateway.
DS_SendHkCmd has 2 instances where sizing of the snprintf using a constant that isn't directly used to define the destination string.
To Reproduce
N/A
Expected behavior
Nothing functional. Ensures write limit is derived directly from the destination buffer's declared size. Prevents overflow of truncation in the event of a user changing the configuration.
Code snips
|
Status = snprintf(FilterTblName, CFE_MISSION_TBL_MAX_NAME_LENGTH, "DS.%s", DS_FILTER_TBL_NAME); |
|
snprintf(PayloadPtr->FilterTblFilename, OS_MAX_PATH_LEN, "%s", FilterTblInfo.LastFileLoaded); |
System observed on:
- Hardware: aarch64
- OS: Ubuntu 24.04.4 LTS
- Versions 0cd8596 commit of apps/ds + 38eaf4244185bc70aa296f1d8df7687e2f13989d cFS bundle
Additional context
N/A
Reporter Info
Justin Figueroa, Vantage Systems Inc
Checklist (Please check before submitting)
Describe the bug
Bring in secure static code analysis updates from lunar gateway.
DS_SendHkCmd has 2 instances where sizing of the snprintf using a constant that isn't directly used to define the destination string.
To Reproduce
N/A
Expected behavior
Nothing functional. Ensures write limit is derived directly from the destination buffer's declared size. Prevents overflow of truncation in the event of a user changing the configuration.
Code snips
DS/fsw/src/ds_cmds.c
Line 1529 in 0cd8596
DS/fsw/src/ds_cmds.c
Line 1535 in 0cd8596
System observed on:
Additional context
N/A
Reporter Info
Justin Figueroa, Vantage Systems Inc