From f4b8d14b8d2de64c3d78445fffc2668043b419ca Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 16 Jan 2023 14:52:08 +0000 Subject: [PATCH] bearer-qmi: explicitly ignore PCOs with undefined contents: There is nothing to process in this kind of PCO fields: <<<<<< TLV: <<<<<< type = "Operator Reserved PCO" (0x2f) <<<<<< length = 8 <<<<<< value = 00:00:00:00:00:00:00:00 <<<<<< translated = [ mcc = '0' mnc = '0' mnc_includes_pcs_digit = 'no' app_specific_info = '{}' container_id = '0' ] Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/690 --- src/mm-bearer-qmi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c index c69f58cd..4737158c 100644 --- a/src/mm-bearer-qmi.c +++ b/src/mm-bearer-qmi.c @@ -576,6 +576,10 @@ process_operator_reserved_pco (MMBearerQmi *self, NULL)) return; + /* Ignore PCOs with undefined contents */ + if (!tmp_mcc && !tmp_mcc && !container_id && !array->len) + return; + app_specific_info_str = ((array->len > 0) ? mm_utils_bin2hexstr ((guint8*) (array->data), array->len) : NULL);