atsamr34_long_range_p2p icon indicating copy to clipboard operation
atsamr34_long_range_p2p copied to clipboard

Bug. Error code value 0xFF used as array index.

Open urgent-canadian opened this issue 2 years ago • 0 comments

When a packet is received and all Rx buffers are full, the variable RxBank is left with its pre-initialized value of 0xFF. The RxBank variable was then used as an array index into a buffer array of BANK_SIZE elements. The error code value of uint8_t 0xFF used as an array index causes packet data to be written far outside the memory allocated for the buffer table of BANK_SIZE elements (4 elements).

255 > 4

:-)

urgent-canadian avatar Jan 17 '24 17:01 urgent-canadian