nasa / nasa/sample_app

Return value of CFE_MSG_GetMsgId is not checked during ProcessCommandPacket or VerifyCmdLength

Open
#159 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.