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

Avoid << on a negative number in Section::crc16 #771

Merged
merged 1 commit into from
Aug 20, 2022

Conversation

atsampson
Copy link
Collaborator

This is undefined behaviour in C++. The straightforward fix is to use uchar as the input type, which also saves a conversion step.

Found with -fsanitize=undefined.

This is undefined behaviour in C++. The straightforward fix is to use
uchar as the input type, which also saves a conversion step.

Found with -fsanitize=undefined.
@atsampson atsampson added bug ld-decode-tools An issue only affecting the ld-decode-tools labels Aug 12, 2022
@happycube happycube merged commit 3b64bb7 into happycube:master Aug 20, 2022
@atsampson atsampson deleted the crcub branch August 20, 2022 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ld-decode-tools An issue only affecting the ld-decode-tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants