diff options
author | Thomas Haller <thaller@redhat.com> | 2015-04-23 12:59:01 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-04-23 16:38:51 +0200 |
commit | 7f8149bdb7b7f8feba65761429869170c5a9a22f (patch) | |
tree | 774dd76e851e4faf492337b339f164d2cf79d672 | |
parent | 8f080747c622889decc1bd12176b48639597a453 (diff) | |
download | NetworkManager-7f8149bdb7b7f8feba65761429869170c5a9a22f.tar.gz |
wifi: avoid assertion in request_wireless_scan() passing NULL to nm_utils_ssid_to_utf8()
-rw-r--r-- | src/devices/wifi/nm-device-wifi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c index 747c021c6d..feba9bbea7 100644 --- a/src/devices/wifi/nm-device-wifi.c +++ b/src/devices/wifi/nm-device-wifi.c @@ -1336,7 +1336,9 @@ request_wireless_scan (gpointer user_data) for (i = 0; i < ssids->len; i++) { ssid = g_ptr_array_index (ssids, i); - foo = nm_utils_ssid_to_utf8 (ssid->data, ssid->len); + foo = ssid->len > 0 + ? nm_utils_ssid_to_utf8 (ssid->data, ssid->len) + : NULL; _LOGD (LOGD_WIFI_SCAN, "(%d) probe scanning SSID '%s'", i, foo ? foo : "<hidden>"); g_free (foo); |