mirror of https://github.com/ARMmbed/mbed-os.git
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
parent
b0c0fc9f66
commit
9f3069f1e1
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue