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

Decoding Segments using Incorrect Macro (CF_PDU_MAX_TLV) #363

Closed
2 tasks done
colteye opened this issue Feb 2, 2023 · 1 comment · Fixed by #413
Closed
2 tasks done

Decoding Segments using Incorrect Macro (CF_PDU_MAX_TLV) #363

colteye opened this issue Feb 2, 2023 · 1 comment · Fixed by #413
Assignees
Milestone

Comments

@colteye
Copy link

colteye commented Feb 2, 2023

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.

Code snips
While checking out the most recent version of the CF repository to test with a custom file sending application, I ran into this line while trying to figure out why NAK's were acting strangely:

if (plseg->num_segments >= CF_PDU_MAX_TLV)

Shouldn't it look moreso like this? There are other lines referencing the CF_PDU_MAX_TLV macro, but those compare against the plseg->num_tlv struct member. When I modified it to this in my instance of cFS, all CFDP functions worked as expected:

if (plseg->num_segments >= CF_PDU_MAX_SEGMENTS)
@skliper
Copy link
Contributor

skliper commented Feb 2, 2023

@dmknutsen @jphickey - looks like a bug to me, thoughts?

@dzbaker dzbaker added the bug label Feb 7, 2023
@dmknutsen dmknutsen self-assigned this Oct 17, 2023
@dmknutsen dmknutsen added this to the Equuleus milestone Oct 17, 2023
dmknutsen added a commit to dmknutsen/CF that referenced this issue Oct 17, 2023
dzbaker added a commit that referenced this issue Oct 19, 2023
Fix #363, decoding segs using incorrect macro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants