dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30873 )
Change subject: pcu_sock: guard against too many TRX ...................................................................... pcu_sock: guard against too many TRX The pcuif only supports a limited but sufficient number of TRXs. When filling in the TRX array in info_ind, we must guard against overflowing the maximum number of TRXs Change-Id: I351080a112f3d3fdf833ee7fa0d77c4cd1d13e42 Related: OS#5198 --- M src/osmo-bsc/pcu_sock.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index 1dcab56..ab3b7d5 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -226,6 +226,12 @@ trx = gsm_bts_trx_num(bts, i); if (!trx) continue; + if (trx->nr >= ARRAY_SIZE(info_ind->trx)) { + LOG_TRX(trx, DPCU, LOGL_NOTICE, "PCU interface (version %u) " + "cannot handle more than %zu transceivers => skipped\n", + PCU_IF_VERSION, ARRAY_SIZE(info_ind->trx)); + break; + } info_ind->trx[i].hlayer1 = 0x2342; info_ind->trx[i].pdch_mask = 0; info_ind->trx[i].arfcn = trx->arfcn; 5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30873 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I351080a112f3d3fdf833ee7fa0d77c4cd1d13e42 Gerrit-Change-Number: 30873 Gerrit-PatchSet: 6 Gerrit-Owner: dexter <pma...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pma...@sysmocom.de> Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de> Gerrit-Reviewer: laforge <lafo...@osmocom.org> Gerrit-Reviewer: pespin <pes...@sysmocom.de> Gerrit-MessageType: merged