laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email )
Change subject: SI10: Fix uninitialized l_bts pointer
......................................................................
SI10: Fix uninitialized l_bts pointer
l_bts must be declared outside the for-loop. If the loop is passed with
n_bts set the first time, l_bts is set. If the loop is passed with
n_bts set next time(s), l_bts is used to encode additional neighbor
cell infos.
Related: CID#330310 and CID#330311
Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
---
M src/osmo-bsc/system_information.c
1 file changed, 18 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c
index 477e9fa..141a720 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -1421,7 +1421,7 @@
const struct gsm_subscriber_connection *conn)
{
struct bitvec *nbv;
- struct gsm_bts *s_bts = conn->lchan->ts->trx->bts;
+ struct gsm_bts *s_bts = conn->lchan->ts->trx->bts, *l_bts = NULL;
int i;
bool any_neighbor = false;
int rc;
@@ -1443,7 +1443,7 @@
/* Get up to 32 possible neighbor frequencies that SI10 can refer to. */
for (i = 0; i < 32; i++) {
- struct gsm_bts *c_bts, *n_bts, *l_bts;
+ struct gsm_bts *c_bts, *n_bts;
struct gsm_subscriber_connection *c;
unsigned int save_cur_bit;
int16_t arfcn;
@@ -1478,6 +1478,7 @@
save_cur_bit = bv.cur_bit;
/* Nth neighbor, so add rest octets with differential cell info. */
LOGP(DRR, LOGL_INFO, "Append cell ID %d to SI 10.\n", n_bts->cell_identity);
+ OSMO_ASSERT(l_bts);
rc = si10_rest_octets_encode_other(s_bts, &bv, l_bts, n_bts, last_i, i);
if (rc < 0) {
LOGP(DRR, LOGL_INFO, "Skip cell ID %d, SI 10 would overflow.\n",
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
Gerrit-Change-Number: 34920
Gerrit-PatchSet: 2
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: jolly.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email )
Change subject: SI10: Fix uninitialized l_bts pointer
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
File src/osmo-bsc/system_information.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/34920/comment/e63403a1_ec8afc80
PS1, Line 1424: struct gsm_bts *s_bts = conn->lchan->ts->trx->bts, *l_bts;
> As described in the commit message, l_bts will be set before calling si10_rest_octets_encode_other. […]
ah, indeed. any_neighbor is false in the first iterateion, at whose end we are setting l_bts and then in a subsequent iteration it must be non-null.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
Gerrit-Change-Number: 34920
Gerrit-PatchSet: 2
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Wed, 01 Nov 2023 13:36:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: jolly <andreas(a)eversberg.eu>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: daniel, osmith, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34923?usp=email )
Change subject: sccp: Introduce test TC_cr_timeout_cc_too_late
......................................................................
Patch Set 2:
(2 comments)
Patchset:
PS2:
> For some reason this builds locally fine, but fails here or in docker: […]
Where this function is coming from? Neither I can find it in osmo-ttcn3-hacks.git, nor in the `deps` subdir. Most likely, you added it to `titan.ProtocolEmulations.SCCP` locally?
File library/SCCP_Templates.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34923/comment/bf34b5ac_2d9e…
PS2, Line 137: function
why using a wrapper function? why not `template (value)`?
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34923?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: If4b53565f1fa19894ca24fa71e02ae7b1941411e
Gerrit-Change-Number: 34923
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 01 Nov 2023 09:49:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge.
jolly has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email )
Change subject: SI10: Fix uninitialized l_bts pointer
......................................................................
Patch Set 1:
(1 comment)
File src/osmo-bsc/system_information.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/34920/comment/7c9b7ab8_bb2ba35f
PS1, Line 1424: struct gsm_bts *s_bts = conn->lchan->ts->trx->bts, *l_bts;
> are you sure you don't need to NULL-intitialize it? At first sight it looks like it's possible to c […]
As described in the commit message, l_bts will be set before calling si10_rest_octets_encode_other.
To make it clearer, I initialize l_bts with NULL and use OSMO_ASSERT(l_bts) to show/check if the pointer is set.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
Gerrit-Change-Number: 34920
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 01 Nov 2023 09:07:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: jolly.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: SI10: Fix uninitialized l_bts pointer
......................................................................
SI10: Fix uninitialized l_bts pointer
l_bts must be declared outside the for-loop. If the loop is passed with
n_bts set the first time, l_bts is set. If the loop is passed with
n_bts set next time(s), l_bts is used to encode additional neighbor
cell infos.
Related: CID#330310 and CID#330311
Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
---
M src/osmo-bsc/system_information.c
1 file changed, 18 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/20/34920/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
Gerrit-Change-Number: 34920
Gerrit-PatchSet: 2
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-MessageType: newpatchset