kevinmehall / rust-soapysdr

Rust bindings for SoapySDR, the vendor-neutral software defined radio hardware abstraction layer
Apache License 2.0
75 stars 22 forks source link

Undefined behavior in `read` #32

Closed cafce25 closed 1 year ago

cafce25 commented 1 year ago

The implementation of read invokes UB by using SoapySDRDevice_readStream to write to buffers which is behind a shared reference. It can probably be solved by changing the signature from &[&mut [E]] to &mut [&mut [E]] unfortunately that's a breaking change.

kevinmehall commented 1 year ago

Good catch, thanks for noticing. Fixed in 4d61a6416d4e9a8fb0852dc562b5904b1f285470.

Let me check if there are other breaking changes that are desirable, and I'll publish 0.4 soon.

kevinmehall commented 11 months ago

Released in 0.4.0