socketcan-rs / socketcan-rs

Linux SocketCAN access in Rust
https://crates.io/crates/socketcan
MIT License
137 stars 71 forks source link

`CanFdSocket` read_frame crash fix #61

Closed pwnorbitals closed 3 months ago

pwnorbitals commented 6 months ago

Reading a standard CAN frame through the CanFdSocket leads to a crash due to mismatching sizes in the frame construction’s copy_from_slice. Thix fix has been tested and builds valid CAN frames.

pd0wm commented 6 months ago

Does CanFdSocket::read_raw_frame need the same fix? https://github.com/socketcan-rs/socketcan-rs/blob/master/src/socket.rs#L617

pwnorbitals commented 6 months ago

Does CanFdSocket::read_raw_frame need the same fix? https://github.com/socketcan-rs/socketcan-rs/blob/master/src/socket.rs#L617

I think so. Fixed it too

fpagliughi commented 3 months ago

Oof. Sorry, my bad. I was hacking on this update before I got an FD controller.