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

can-rs: explicitly check number of received can bytes #90

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheButlah
Copy link
Collaborator

No description provided.

@TheButlah TheButlah requested review from oldgalileo and fouge May 4, 2024 07:22
@TheButlah TheButlah force-pushed the thebutlah/fix-possible-bug branch 2 times, most recently from c553e42 to f7c3b13 Compare May 6, 2024 22:12
@TheButlah TheButlah force-pushed the thebutlah/fix-possible-bug branch from f7c3b13 to be23237 Compare May 7, 2024 14:16
return Err(io::Error::last_os_error());
} else if nbytes as usize != std::mem::size_of::<RawFrame<{ N }>>() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not hold up, as when N = 64 the acceptable values of nbytes are either size_of::<RawFrame<N=8>> OR size_of::<RawFrame<N=64>>

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.

2 participants