rspro_client_fsm: Fix integer overflow calculating re-establishment delay

Fixes: CID#307493: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
Change-Id: Ib1cca5ac0d27807936a52e0c013f0442350ecc00
This commit is contained in:
Harald Welte 2023-07-18 13:34:14 +02:00
parent 852eeb6f31
commit 189515f199
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ static void srvc_do_reestablish(struct osmo_fsm_inst *fi)
}
/* determine if we need to delay reestablishment */
const int64_t need_ms = k_reestablish_delay_s[srvc->reestablish_delay_idx] * 1000;
const int64_t need_ms = (int64_t) k_reestablish_delay_s[srvc->reestablish_delay_idx] * 1000;
int64_t delay_ms = need_ms - since_last_ms;
if (delay_ms > 0) {