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

Assert in crc8::validate that buffer size is a multiple of 3 #13

Merged
merged 2 commits into from
Sep 1, 2020

Conversation

rnestler
Copy link
Contributor

@rnestler rnestler commented Sep 1, 2020

Previously crc8::validate would only panic in debug builds, but not in
release builds when passing in buffers with a size which isn't a
multiple of 3. In release builds the remaining bytes just wouldn't get
validated.

Fixes #10

@rnestler rnestler requested review from dbrgn and a team September 1, 2020 16:32
Previously crc8::validate would only panic in debug builds, but not in
release builds when passing in buffers with a size which isn't a
multiple of 3. In release builds the remaining bytes just wouldn't get
validated.

Fixes #10
@rnestler rnestler force-pushed the always-panic-in-crc8-validatge branch from c84b42c to 24cfc96 Compare September 1, 2020 16:37
@rnestler rnestler merged commit f636145 into master Sep 1, 2020
@rnestler rnestler deleted the always-panic-in-crc8-validatge branch September 1, 2020 16:42
rnestler added a commit that referenced this pull request Sep 2, 2020
Previously it would only panic in debug builds to match the behaviour of
crc8::validate. But since we changed that in #13 it makes sense to adapt
here as well.
rnestler added a commit that referenced this pull request Sep 2, 2020
#15)

Previously it would only panic in debug builds to match the behavior of
crc8::validate. But since we changed that in #13 it makes sense to adapt
here as well.
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

Successfully merging this pull request may close these issues.

crc8 buffer size validation
2 participants