Change in osmo-sgsn[master]: gb_proxy_peer: fix NULL pointer dereference in gbproxy_sgsn_alloc()

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 15:22:39 UTC 2021


fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/21947 )

Change subject: gb_proxy_peer: fix NULL pointer dereference in gbproxy_sgsn_alloc()
......................................................................

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
---
M src/gbproxy/gb_proxy_peer.c
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gbproxy/gb_proxy_peer.c b/src/gbproxy/gb_proxy_peer.c
index 863bcce..544eb5f 100644
--- a/src/gbproxy/gb_proxy_peer.c
+++ b/src/gbproxy/gb_proxy_peer.c
@@ -364,7 +364,8 @@
 
 	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;
 	}
 

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I1c592dd6f0da5f167290f38de3b30a1a04c4313d
Gerrit-Change-Number: 21947
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210105/331a4689/attachment.htm>


More information about the gerrit-log mailing list