Closed MedadRufus closed 1 year ago
This looks potentially problematic: https://github.com/ImperialSpaceSociety/LoRaMac-node/blob/fa1a6b613691f293d8ae41102fa9a3e05f1f2cf0/src/peripherals/playback.c#L127-L133
rand_time_pos_index may go out of range.
rand_time_pos_index
Fortunately, rand_time_pos_index is handled safely further downstream with a mod() function. Otherwise it could have caused problems. https://github.com/ImperialSpaceSociety/LoRaMac-node/blob/fa1a6b613691f293d8ae41102fa9a3e05f1f2cf0/src/peripherals/bsp.c#L610-L617
mod()
this is not possible anymore, as the n_positions_saved_since_boot variable has been removed in #467
n_positions_saved_since_boot
This looks potentially problematic: https://github.com/ImperialSpaceSociety/LoRaMac-node/blob/fa1a6b613691f293d8ae41102fa9a3e05f1f2cf0/src/peripherals/playback.c#L127-L133
rand_time_pos_index
may go out of range.Fortunately,
rand_time_pos_index
is handled safely further downstream with amod()
function. Otherwise it could have caused problems. https://github.com/ImperialSpaceSociety/LoRaMac-node/blob/fa1a6b613691f293d8ae41102fa9a3e05f1f2cf0/src/peripherals/bsp.c#L610-L617