libmsc: fix NULL pointer dereference in trans_lcls_compose()

Change-Id: I96342de4cb3e0bc3d3cac7538d4517aa211e8a38
Fixes: CID#240768
changes/53/25953/1
Vadim Yanitskiy 1 year ago
parent a1a70be593
commit 583883bf2e
  1. 10
      src/libmsc/transaction.c

@ -112,6 +112,11 @@ struct gsm_trans *trans_find_by_sm_rp_mr(const struct gsm_network *net,
struct osmo_lcls *trans_lcls_compose(const struct gsm_trans *trans, bool use_lac)
{
if (!trans) {
LOGP(DCC, LOGL_ERROR, "LCLS: unable to fill parameters for unallocated transaction\n");
return NULL;
}
if (!trans->net->a.sri->sccp)
return NULL;
@ -119,11 +124,6 @@ struct osmo_lcls *trans_lcls_compose(const struct gsm_trans *trans, bool use_lac
struct osmo_lcls *lcls;
uint8_t w = osmo_ss7_pc_width(&ss7->cfg.pc_fmt);
if (!trans) {
LOGP(DCC, LOGL_ERROR, "LCLS: unable to fill parameters for unallocated transaction\n");
return NULL;
}
if (!trans->net->lcls_permitted) {
LOGP(DCC, LOGL_NOTICE, "LCLS disabled globally\n");
return NULL;

Loading…
Cancel
Save