aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-01-05 14:42:46 +0100
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-01-05 15:26:30 +0100
commite245677cdd27e488ef6a92f36aca875e52d63816 (patch)
treedba4f4f8322423e9cd6e966464fb072423230934 /src
parent1c33e4af051c1b38149bde13b5ee0248236a084b (diff)
gb_proxy_peer: fix NULL pointer dereference in gbproxy_sgsn_alloc()
LOGPSGSN_CAT() dereferences sgsn->nse in order to get NSEI. Change-Id: I1c592dd6f0da5f167290f38de3b30a1a04c4313d Fixes: CID#215868
Diffstat (limited to 'src')
-rw-r--r--src/gbproxy/gb_proxy_peer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gbproxy/gb_proxy_peer.c b/src/gbproxy/gb_proxy_peer.c
index 863bcceb..544eb5f7 100644
--- a/src/gbproxy/gb_proxy_peer.c
+++ b/src/gbproxy/gb_proxy_peer.c
@@ -364,7 +364,8 @@ struct gbproxy_sgsn *gbproxy_sgsn_alloc(struct gbproxy_config *cfg, uint16_t nse
sgsn->nse = gbproxy_nse_alloc(cfg, nsei, true);
if (!sgsn->nse) {
- LOGPSGSN_CAT(sgsn, DOBJ, LOGL_INFO, "Could not allocate NSE(%05u) for SGSN\n", nsei);
+ LOGP(DOBJ, LOGL_ERROR, "Could not allocate NSE(%05u) for SGSN(%s)\n",
+ nsei, sgsn->name);
goto free_sgsn;
}