fixeria has submitted this change and it was merged. (
https://gerrit.osmocom.org/c/osmo-bts/+/15439 )
Change subject: common/rsl.c: fix possible NULL-pointer dereference
......................................................................
common/rsl.c: fix possible NULL-pointer dereference
Change-Id: I11a35a8f500fafa7b3c93d2f2244cc4d42f09f1b
Fixes: CID#203810
---
M src/common/rsl.c
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 056c16d..c0d43d0 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1745,10 +1745,14 @@
/* 8.5.8 CBCH Load Information */
int rsl_tx_cbch_load_indication(struct gsm_bts *bts, bool ext_cbch, bool
overflow, uint8_t amount)
{
- struct gsm_lchan *lchan = gsm_bts_get_cbch(bts);
+ struct gsm_lchan *lchan;
struct msgb *msg;
uint8_t load_info;
+ lchan = gsm_bts_get_cbch(bts);
+ if (!lchan)
+ return -ENODEV;
+
msg = rsl_msgb_alloc(sizeof(struct abis_rsl_cchan_hdr));
if (!msg)
return -ENOMEM;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15439
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I11a35a8f500fafa7b3c93d2f2244cc4d42f09f1b
Gerrit-Change-Number: 15439
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