Skip to content

Commit 7b7d5eb

Browse files
author
Hasnain Virk
committed
LoRaWAN: Memory overrun correction
A typo in LoRaPHYCN470 is causing memory overrun. We were supposed to fill-in default channel mask and iterate over CN470_CHANNEL_MASK_SIZE times.
1 parent dd91b90 commit 7b7d5eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/lorawan/lorastack/phy/LoRaPHYCN470.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ LoRaPHYCN470::LoRaPHYCN470()
220220
}
221221

222222
// Initialize the channels default mask
223-
for (uint8_t i = 0; i < CN470_MAX_NB_CHANNELS; i++) {
223+
for (uint8_t i = 0; i < CN470_CHANNEL_MASK_SIZE; i++) {
224224
default_channel_mask[i] = 0xFFFF & fsb_mask[i];
225225
}
226226

0 commit comments

Comments
 (0)