From be388aa53fde3d02e4f8ead5c4578648f8ab0f60 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Sat, 23 Oct 2021 16:24:14 +0200 Subject: [PATCH] rrc_nr: temporary fix of heap-use-after free see https://github.com/softwareradiosystems/srsLTE/issues/3545 --- srsenb/src/stack/rrc/rrc_nr.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srsenb/src/stack/rrc/rrc_nr.cc b/srsenb/src/stack/rrc/rrc_nr.cc index 7315a88d7..1d6d0c70e 100644 --- a/srsenb/src/stack/rrc/rrc_nr.cc +++ b/srsenb/src/stack/rrc/rrc_nr.cc @@ -613,6 +613,8 @@ void rrc_nr::ue::activity_timer_expired(const activity_timeout_type_t type) { parent->logger.info("Activity timer for rnti=0x%x expired after %d ms", rnti, activity_timer.time_elapsed()); + state = rrc_nr_state_t::RRC_IDLE; + switch (type) { case UE_INACTIVITY_TIMEOUT: // TODO: Add action to be executed @@ -627,8 +629,6 @@ void rrc_nr::ue::activity_timer_expired(const activity_timeout_type_t type) parent->logger.error( "Unhandled reason for activity timer expiration. rnti=0x%x, cause %d", rnti, static_cast(type)); } - - state = rrc_nr_state_t::RRC_IDLE; } std::string rrc_nr::ue::to_string(const activity_timeout_type_t& type)