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
This commit is contained in:
Holger Hans Peter Freyther 2013-07-14 08:54:07 +02:00
parent ae9d8d3131
commit 921b2278df
1 changed files with 2 additions and 2 deletions

View File

@ -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);