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

data member in iccom_package structure - must be unsigned. #3

Open
Bosch-SW opened this issue May 13, 2022 · 0 comments
Open

data member in iccom_package structure - must be unsigned. #3

Bosch-SW opened this issue May 13, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Bosch-SW
Copy link
Owner

The invalid type of the package data leads to invalid casting in comprarison.

the struct iccom_package has a wrong data member type: char*, which in comparison with ACK value expands the 0xD0 to 0xFFFFFFD0 (which is correct according to the signed type rules). And as long as 0xD0 (the proper ack) is not equal to 0xFFFFFFD0, then the comparison ACK always fails, and ICCom never gets an ACK package.

Bug discovered on x86 arch.

Solution: to change the data member type to unsigned char*.

Bug will be closed after testing.

@Bosch-SW Bosch-SW added the bug Something isn't working label May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant