add comments about buffer unsound
This commit is contained in:
parent
40282c2666
commit
fdb15b2054
1 changed files with 4 additions and 0 deletions
|
@ -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)?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue