[PATCH] openbsc[master]: gprs_sgsn.c: initialize ptmsi with 0xdeadbeef

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/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Sat Feb 4 00:57:48 UTC 2017


gprs_sgsn.c: initialize ptmsi with 0xdeadbeef

Fix uninitialized memory access warning.
Found by valgrind.

Change-Id: Ibc2d585c5db899e6af20104211e32faf3822633a
---
M openbsc/src/gprs/gprs_sgsn.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/49/1749/2

diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c
index e85e1a9..40a66d9 100644
--- a/openbsc/src/gprs/gprs_sgsn.c
+++ b/openbsc/src/gprs/gprs_sgsn.c
@@ -610,7 +610,7 @@
 uint32_t sgsn_alloc_ptmsi(void)
 {
 	struct sgsn_mm_ctx *mm;
-	uint32_t ptmsi;
+	uint32_t ptmsi = 0xdeadbeef;
 	int max_retries = 100;
 
 restart:

-- 
To view, visit https://gerrit.osmocom.org/1749
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibc2d585c5db899e6af20104211e32faf3822633a
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list