neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/16744 )


Change subject: fix nullpointer: in gsm48_rx_gmm_ra_upd_req()
......................................................................

fix nullpointer: in gsm48_rx_gmm_ra_upd_req()

This caused frequent crashes at 36c3. The "proper" fix is probably elsewhere
(lynxis mentions an unfinished patch), but at least this prevented some crashes
during active operation.

Change-Id: Ifde15dc4151d84748f0e67b32c9c260cb2d9d8fc
---
M src/sgsn/gprs_gmm.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/44/16744/1

diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c
index f62d0d1..d340005 100644
--- a/src/sgsn/gprs_gmm.c
+++ b/src/sgsn/gprs_gmm.c
@@ -1642,7 +1642,7 @@
        rate_ctr_inc(&mmctx->ctrg->ctr[GMM_CTR_PKTS_SIG_IN]);
 
        /* Update the MM context with the new RA-ID */
-       if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) {
+       if (mmctx->ran_type == MM_CTX_T_GERAN_Gb && msgb_bcid(msg)) {
                bssgp_parse_cell_id(&mmctx->ra, msgb_bcid(msg));
                /* Update the MM context with the new (i.e. foreign) TLLI */
                mmctx->gb.tlli = msgb_tlli(msg);

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ifde15dc4151d84748f0e67b32c9c260cb2d9d8fc
Gerrit-Change-Number: 16744
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofm...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to