Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad command size check #463

Open
2 tasks done
RR-HSz opened this issue Oct 30, 2024 · 1 comment
Open
2 tasks done

Bad command size check #463

RR-HSz opened this issue Oct 30, 2024 · 1 comment
Assignees

Comments

@RR-HSz
Copy link

RR-HSz commented Oct 30, 2024

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
In the function CF_ProcessGroundCommand() the size check of PurgeQueue command is incorrect.
The sizeof uses the wrong type in line 87: it excludes the CommandHeader, so the command size check fails all the time (for this command).
CF_PurgeQueueCmd_t shall be used (as the Cmd_t was used for all the other commands).

To Reproduce
Steps to reproduce the behavior:

  1. Initiate a CF_PURGE_QUEUE_CC command (with a valid channel number as a parameter)
  2. See error in console ouptut or Event messages:
    EVENT --> CF-ERROR Event ID: 151 : CF: invalid ground command length for command 0x15, expected 4 got 12

Expected behavior
The command size check shall be correct, and the command shall be executed.

Code snips
Ln 87 of cf_dispatch.c:
[CF_PURGE_QUEUE_CC] = sizeof(CF_UnionArgs_Payload_t),

System observed on:

  • Hardware: Laptop
  • OS: Ubuntu:23.10
  • Versions: version git:draco-rc5-197-g7f36a040, CF Version 3.0.99.0

Additional context
N.A.

Reporter Info
Szilárd HELF
Remred

@jphickey
Copy link
Contributor

Thanks for identifying this and pointing it out. This should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants