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

Fix #213, updated CFDP class validation #303

Merged
merged 1 commit into from
Aug 4, 2022
Merged

Conversation

havencarlson
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
Fix #213, add validation to CF_CmdTxFile() and CF_CmdPlaybackDir() to prevent negative CFDP class values.

Testing performed
Unit testing

Expected behavior changes
Reject command if CFDP class is negative

System(s) tested on

  • OS: Ubuntu 18.04

Contributor Info - All information REQUIRED for consideration of pull request
Haven Carlson - NASA

fsw/src/cf_cmd.c Fixed Show fixed Hide fixed
fsw/src/cf_cmd.c Fixed Show fixed Hide fixed
@havencarlson havencarlson added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Aug 3, 2022
@dzbaker
Copy link
Contributor

dzbaker commented Aug 3, 2022

CCB 3 Aug 2022: Check that it is equal to 1 or 2 in validation.

@jphickey
Copy link
Contributor

jphickey commented Aug 3, 2022

Here's another suggestion - define CF_CLASS_MAX in the enum, and check that it is not greater than that. That's the way I often see enums validated, as it avoids the assumption that a certain label is the "last one"

@dzbaker dzbaker merged commit a67eaf4 into nasa:main Aug 4, 2022
@dzbaker dzbaker added CCB:Approved and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Aug 8, 2022
@skliper skliper added this to the Draco milestone Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential acceptance of commands with invalid CFDP class
5 participants