neels has submitted this change. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/33401 )
Change subject: coverity: hnbgw_cn: avoid NULL deref in LOGP
......................................................................
coverity: hnbgw_cn: avoid NULL deref in LOGP
Related: CID#321281
Change-Id: Icc2b45c8df8d92cfb42582615313d83389cf1621
---
M src/osmo-hnbgw/hnbgw_cn.c
1 file changed, 12 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/src/osmo-hnbgw/hnbgw_cn.c b/src/osmo-hnbgw/hnbgw_cn.c
index 58b0af8..b95cf28 100644
--- a/src/osmo-hnbgw/hnbgw_cn.c
+++ b/src/osmo-hnbgw/hnbgw_cn.c
@@ -861,7 +861,8 @@
sccp = osmo_sccp_simple_client_on_ss7_id(g_hnbgw, ss7 ? ss7->cfg.id : 0,
cnlink->name, DEFAULT_PC_HNBGW,
OSMO_SS7_ASP_PROT_M3UA, 0, "localhost", -1, "localhost");
if (!sccp) {
- LOG_CNLINK(cnlink, DCN, LOGL_ERROR, "Failed to configure 'cs7 instance
%u'\n", ss7->cfg.id);
+ LOG_CNLINK(cnlink, DCN, LOGL_ERROR, "Failed to configure SCCP on 'cs7 instance
%u'\n",
+ ss7 ? ss7->cfg.id : 0);
return -1;
}
ss7 = osmo_sccp_get_ss7(sccp);
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/33401
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Icc2b45c8df8d92cfb42582615313d83389cf1621
Gerrit-Change-Number: 33401
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged