[XS] Change in osmo-sgsn[master]: gprs_llc_xid: do not crash when xid_field->data is NULL
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/43997?usp=email ) Change subject: gprs_llc_xid: do not crash when xid_field->data is NULL ...................................................................... gprs_llc_xid: do not crash when xid_field->data is NULL Under normal condition, xid_field->data should never be NULL, The function gprs_llc_dump_xid_fields contains an OSMO_ASSERT, that may crash the whole process if xid_field->data_len is greater 0 while xid_field->data is NULL. This is of course an invalid condition, but this is a dump function that only displays contents, possibly used to debug things. Let's not crash the whole process here. Change-Id: I762942707675c38d58dda74d4390c512ac720122 Related: OS#7095 --- M src/sgsn/gprs_llc_xid.c 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve diff --git a/src/sgsn/gprs_llc_xid.c b/src/sgsn/gprs_llc_xid.c index b91fa6b..88878f8 100644 --- a/src/sgsn/gprs_llc_xid.c +++ b/src/sgsn/gprs_llc_xid.c @@ -263,8 +263,7 @@ OSMO_ASSERT(xid_fields); llist_for_each_entry(xid_field, xid_fields, list) { - if (xid_field->data_len) { - OSMO_ASSERT(xid_field->data); + if (xid_field->data_len && xid_field->data) { LOGP(DLLC, logl, "XID: type %s, data_len=%d, data=%s\n", get_value_string(gprs_llc_xid_type_names, -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/43997?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I762942707675c38d58dda74d4390c512ac720122 Gerrit-Change-Number: 43997 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de>
participants (1)
-
laforge