laforge has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bts/+/27693 )
Change subject: VTY: fix NULL-pointer dereference in 'show transceiver'
......................................................................
VTY: fix NULL-pointer dereference in 'show transceiver'
Change-Id: I403a027f064a4898eb74a11381bab3c884ec8ccf
---
M src/osmo-bts-trx/trx_vty.c
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c
index bd6b3b1..70e9b36 100644
--- a/src/osmo-bts-trx/trx_vty.c
+++ b/src/osmo-bts-trx/trx_vty.c
@@ -89,11 +89,16 @@
else
vty_out(vty, " bsic : undefined%s", VTY_NEWLINE);
+ /* trx->ts[tn].priv is NULL in absence of the A-bis connection */
+ if (trx->rsl_link == NULL)
+ continue;
+
for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) {
const struct gsm_bts_trx_ts *ts = &trx->ts[tn];
const struct l1sched_ts *l1ts = ts->priv;
const struct trx_sched_multiframe *mf;
+ OSMO_ASSERT(l1ts != NULL);
mf = &trx_sched_multiframes[l1ts->mf_index];
vty_out(vty, " timeslot #%u (%s)%s",
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bts/+/27693
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I403a027f064a4898eb74a11381bab3c884ec8ccf
Gerrit-Change-Number: 27693
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged