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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15813 )
Change subject: ipa: Fix crash when parsing of received IPA SCCP message fails
......................................................................
ipa: Fix crash when parsing of received IPA SCCP message fails
If an IPA ASP is sending us a SCCP message that cannot be parsed,
we shouldn't crash but handle this gracefully.
Change-Id: Ib7a8c2a36dd1b82ca8ed472760c1682ede50cb90
Fixes: OS#4236
---
M src/ipa.c
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/ipa.c b/src/ipa.c
index d013916..eeefbe8 100644
--- a/src/ipa.c
+++ b/src/ipa.c
@@ -204,6 +204,8 @@
/* re-encode SUA to SCCP and return */
sccp_msg_out = osmo_sua_to_sccp(sua);
+ if (!sccp_msg_out)
+ LOGPASP(asp, DLSS7, LOGL_ERROR, "Couldn't re-encode SUA to SCCP\n");
xua_msg_free(sua);
return sccp_msg_out;
}
@@ -259,6 +261,10 @@
/* Second, patch this into the SCCP message */
msg = patch_sccp_with_pc(asp, msg, opc, dpc);
+ if (!msg) {
+ LOGPASP(asp, DLSS7, LOGL_ERROR, "Unable to patch PC into SCCP message; dropping\n");
+ return -1;
+ }
/* Third, create a MTP3/M3UA label with those point codes */
memset(&data_hdr, 0, sizeof(data_hdr));
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15813
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ib7a8c2a36dd1b82ca8ed472760c1682ede50cb90
Gerrit-Change-Number: 15813
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191020/69a2fbf9/attachment.htm>