fixeria submitted this change.
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(-)
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 change 27860. To unsubscribe, or for help writing mail filters, visit settings.