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

guard on error condition misses an error #2

Open
schaefer01 opened this issue Nov 17, 2021 · 0 comments
Open

guard on error condition misses an error #2

schaefer01 opened this issue Nov 17, 2021 · 0 comments

Comments

@schaefer01
Copy link

embedded_bootloader.c has a systematic error in a conditional used in multiple places, there are two guards and the error is only detected if the first guard is NOT an error.

for example, in ebh_rx_data_block_32,

if((rx_buf[0] == EBH_CORE_MSG_MESSAGE) && (rx_buf[1] != EBH_CORE_MSG_OPERATION_SUCCESSFUL))

if rx_buf[0] is not EBH_CORE_MSG_MESSAGE, the error condition is not detected.

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

1 participant