diff --git a/shared/nm-glib-aux/nm-shared-utils.c b/shared/nm-glib-aux/nm-shared-utils.c index 5b8f96b151..66147e60f1 100644 --- a/shared/nm-glib-aux/nm-shared-utils.c +++ b/shared/nm-glib-aux/nm-shared-utils.c @@ -4919,9 +4919,11 @@ _nm_utils_format_variant_attributes_full (GString *str, value = g_variant_get_boolean (variant) ? "true" : "false"; else if (g_variant_is_of_type (variant, G_VARIANT_TYPE_STRING)) value = g_variant_get_string (variant, NULL); - else if (g_variant_is_of_type (variant, G_VARIANT_TYPE_BYTESTRING)) + else if (g_variant_is_of_type (variant, G_VARIANT_TYPE_BYTESTRING)) { + /* FIXME: there is no guarantee that the byte array + * is valid UTF-8.*/ value = g_variant_get_bytestring (variant); - else + } else continue; if (sep)