fixeria has uploaded this change for review. ( 
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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/60/27860/1

diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 03e409d..5c8be50 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: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-MessageType: newchange

Reply via email to