fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/27860 )

Change subject: abis_rsl: fix NULL pointer dereference in abis_rsl_rx_rll()
......................................................................

abis_rsl: fix NULL pointer dereference in abis_rsl_rx_rll()

Found with GCC's static analyzer (-fanalyzer).

Change-Id: I620538388f6971418980b03a6a1b2384e7c87e15
---
M src/osmo-bsc/abis_rsl.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index b5375e0..94b6349 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -2520,6 +2520,8 @@

        sapi = rllh->link_id & 0x7;
        msg->lchan = lchan_lookup(sign_link->trx, rllh->chan_nr, "Abis RSL rx 
RLL: ");
+       if (OSMO_UNLIKELY(msg->lchan == NULL))
+               return -1;

        switch (rllh->c.msg_type) {
        case RSL_MT_DATA_IND:

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27860
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I620538388f6971418980b03a6a1b2384e7c87e15
Gerrit-Change-Number: 27860
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to