add comments about buffer unsound

This commit is contained in:
Guilherme S. Salustiano 2024-02-10 08:58:31 +01:00
parent 40282c2666
commit fdb15b2054

View File

@ -334,6 +334,8 @@ impl<'d, T: Instance> Radio<'d, T> {
}
/// Send packet
/// If the length byte in the package is greater than the buffer length
/// the radio will read memory out of the buffer bounds
pub async fn transmit(&mut self, buffer: &[u8]) -> Result<(), Error> {
self.set_buffer(buffer)?;
@ -349,6 +351,8 @@ impl<'d, T: Instance> Radio<'d, T> {
}
/// Receive packet
/// If the length byte in the received package is greater than the buffer length
/// the radio will write memory out of the buffer bounds
pub async fn receive(&mut self, buffer: &mut [u8]) -> Result<(), Error> {
self.set_buffer(buffer)?;