libmsc: fix NULL pointer dereference in trans_lcls_compose()
Change-Id: I96342de4cb3e0bc3d3cac7538d4517aa211e8a38 Fixes: CID#240768
This commit is contained in:
parent
a1a70be593
commit
583883bf2e
|
@ -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)
|
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)
|
if (!trans->net->a.sri->sccp)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -119,11 +124,6 @@ struct osmo_lcls *trans_lcls_compose(const struct gsm_trans *trans, bool use_lac
|
||||||
struct osmo_lcls *lcls;
|
struct osmo_lcls *lcls;
|
||||||
uint8_t w = osmo_ss7_pc_width(&ss7->cfg.pc_fmt);
|
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) {
|
if (!trans->net->lcls_permitted) {
|
||||||
LOGP(DCC, LOGL_NOTICE, "LCLS disabled globally\n");
|
LOGP(DCC, LOGL_NOTICE, "LCLS disabled globally\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue