diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-07-14 08:54:07 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-07-14 09:04:51 +0200 |
commit | 921b2278df38077bb87afb33190511ac2431893d (patch) | |
tree | 6c436cbab0ad04e29be86d568c4972f511e1912f /openbsc/src | |
parent | ae9d8d3131effe1243ed38f729440b8c0adcc808 (diff) |
smpp: Fix possible NULL dereference of the emse->acl
The esme->acl is treated like it can be NULL in other places
of the code. Assume it can be NULL during this check as well.
Dereference after null check (FORWARD_NULL)
9. var_deref_op: Dereferencing null pointer "esme->acl".
Fixes: Coverity CID 1042374
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/libmsc/smpp_openbsc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c index e41d37776..f898cae6f 100644 --- a/openbsc/src/libmsc/smpp_openbsc.c +++ b/openbsc/src/libmsc/smpp_openbsc.c @@ -504,7 +504,7 @@ unknown_mo: } /* Transparently pass on DCS via SMPP if requested */ - if (esme->acl->dcs_transparent) + if (esme->acl && esme->acl->dcs_transparent) deliver.data_coding = dcs; if (mode == MODE_7BIT) { @@ -530,7 +530,7 @@ unknown_mo: memcpy(deliver.short_message, sms->user_data, deliver.sm_length); } - if (esme->acl->osmocom_ext && conn && conn->lchan) + if (esme->acl && esme->acl->osmocom_ext && conn && conn->lchan) append_osmo_tlvs(&deliver.tlv, conn->lchan); return smpp_tx_deliver(esme, &deliver); |