unittests: Test_LoRaMac.post_process_mcps_req: Fix segfault

We had commented out a line where we reset LoRaPHY_stub::uint16_value to
0. This was causing an invalid array access in
LoRaMac::handle_data_frame, when trying to extract the
_mps_indication.channel from list of channel_params_t returned by
lora_phy->get_phy_channels.
pull/14944/head
Robert Walton 2021-07-23 11:30:17 +01:00
parent b0c0fc9f66
commit 9f3069f1e1
1 changed files with 1 additions and 1 deletions

View File

@ -432,7 +432,7 @@ TEST_F(Test_LoRaMac, post_process_mcps_req)
LoRaMacCrypto_stub::int_table_idx_value = 0;
LoRaMacCrypto_stub::int_table[0] = 4;
LoRaMacCrypto_stub::int_table[1] = 4;
// LoRaPHY_stub::uint16_value = 0;
LoRaPHY_stub::uint16_value = 0;
object->on_radio_rx_done(payload, 16, 0, 0);
object->post_process_mcps_req();