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

"count_bytes" inside CF_CFDP_R2_CalcCrcChunk is not incremented during loop #147

Closed
jphickey opened this issue Jan 4, 2022 · 0 comments · Fixed by #137
Closed

"count_bytes" inside CF_CFDP_R2_CalcCrcChunk is not incremented during loop #147

jphickey opened this issue Jan 4, 2022 · 0 comments · Fixed by #137
Milestone

Comments

@jphickey
Copy link
Contributor

jphickey commented Jan 4, 2022

The CF_CFDP_R2_CalcCrcChunk function has what appears to be an intent to limit the amount of bytes processed during each call. There is a comparison of a local count_bytes to the configured rx_crc_calc_bytes_per_wakeup here:

while ((count_bytes < CF_AppData.config_table->rx_crc_calc_bytes_per_wakeup) && (RXC < t->fsize))

However, nowhere during this loop is count_bytes incremented, so it is always 0, and thus this limit is never reached.

Found during rework of unit tests on here, branch coverage showed it not possible to get this condition because count_bytes is always 0.

@skliper skliper added this to the Draco milestone Jan 7, 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 a pull request may close this issue.

2 participants