embassy
embassy copied to clipboard
net: UB in TcpSocket
The lifetime transmute here is UB
https://github.com/embassy-rs/embassy/blob/a361050224e561fcd682041981307f9c49293eeb/embassy-net/src/tcp_socket.rs#L139-L143
The justification in thecomment is bogus, because even if the TcpSocket doesn't "touch" these bytes, it has a &mut to them, which is already UB.