Change in libosmocore[master]: gprs_bssgp: fix uninitialized struct fields in bssgp_create_rim_ri()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Tue Jan 5 13:55:51 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/21948 )


Change subject: gprs_bssgp: fix uninitialized struct fields in bssgp_create_rim_ri()
......................................................................

gprs_bssgp: fix uninitialized struct fields in bssgp_create_rim_ri()

Change-Id: Ifc3dda1fe5e9743072751dbb14c2d973388cb3b2
Fixes: CID#215836
---
M src/gb/gprs_bssgp.c
1 file changed, 6 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/48/21948/1

diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index fd2a48c..bf0e821 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -398,9 +398,12 @@
 		/* Note: 3GPP TS 24.301 Figure 9.9.3.32.1 and 3GPP TS 24.008
 		 * Figure 10.5.130 specify MCC/MNC encoding in the same way,
 		 * so we can re-use gsm48_encode_ra() for that. */
-		raid_temp.mcc = ri->eutran.tai.mcc;
-		raid_temp.mnc = ri->eutran.tai.mnc;
-		raid_temp.mnc_3_digits = ri->eutran.tai.mnc_3_digits;
+		raid_temp = (struct gprs_ra_id) {
+			.mcc = ri->eutran.tai.mcc,
+			.mnc = ri->eutran.tai.mnc,
+			.mnc_3_digits = ri->eutran.tai.mnc_3_digits,
+		};
+
 		gsm48_encode_ra((struct gsm48_ra_id *)buf, &raid_temp);
 		osmo_store16be(ri->eutran.tai.tac, buf + 3);
 		OSMO_ASSERT(ri->eutran.global_enb_id_len <=

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21948
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ifc3dda1fe5e9743072751dbb14c2d973388cb3b2
Gerrit-Change-Number: 21948
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210105/2be4665d/attachment.htm>


More information about the gerrit-log mailing list