laforge submitted this change.
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(-)
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 change 43997. To unsubscribe, or for help writing mail filters, visit settings.