From 0a64237932a2576d33d8230ba519d3f1be87ec34 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 6 Dec 2023 10:48:19 +0100 Subject: [PATCH] all: adjust nm_utils_is_empty_ssid() to return TRUE for zero length SSID A SSID of zero length, really looks "empty". Let nm_utils_is_empty_ssid() indicate so too. This affects some places, that try to guess what a hidden SSID looks like. In general, it seems that treating a length of zero as empty, is suitable also then. --- src/libnm-glib-aux/nm-shared-utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libnm-glib-aux/nm-shared-utils.c b/src/libnm-glib-aux/nm-shared-utils.c index 6cbfea2c8a..f8620279b3 100644 --- a/src/libnm-glib-aux/nm-shared-utils.c +++ b/src/libnm-glib-aux/nm-shared-utils.c @@ -5970,6 +5970,9 @@ nm_utils_exp10(gint16 ex) gboolean _nm_utils_is_empty_ssid_arr(const guint8 *ssid, gsize len) { + if (len == 0) + return TRUE; + /* Single white space is for Linksys APs */ if (len == 1 && ssid[0] == ' ') return TRUE;