Return value of CFE_MSG_GetMsgId is not checked during ProcessCommandPacket or VerifyCmdLength
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 67
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
CFE_MSG_GetMsgId returns a status value to indicate success or failure of the call, but neither of the usages in the sample app check if it is successful nor do they state that the return value is ignored by design.
To Reproduce
N/A
Expected behavior
Sample app should either make use of the return value to verify success or should note the reason why this is not being done.
Code snips
https://github.com/nasa/sample_app/blob/d009197df721af1f430d173584fa64a507a94a13/fsw/src/sample_app.c#L235
https://github.com/nasa/sample_app/blob/d009197df721af1f430d173584fa64a507a94a13/fsw/src/sample_app.c#L442
System observed on:
N/A
Reporter Info
Alan Gibson NASA/GSFC 587
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in fsw/src/sample_app.c at the two CFE_MSG_GetMsgId usages linked in the issue, around lines 235 and 442. Check how each call's status is handled, then ensure both usages either verify success or clearly document why the return value is intentionally ignored. Done means both reported locations address the status result consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100