From bb6da998b22d6ca9356c1947d877ccc6d006ff20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Tue, 13 Mar 2012 15:37:11 +0100 Subject: [PATCH] libnm-util: do not assert on buggy drivers with no WEP cipher capabilities The crash happens with ipw2200, kernel 3.2.0 when a user tries to connect to a hidden network using nm-applet. g_assert (have_ap); is hit in 'case NMU_SEC_STATIC_WEP:' branch. Reported by Mathieu Trudel-Lapierre. See also: (lp:908516) (lp:908380) --- libnm-util/nm-utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c index 21d5316758..debf0e5794 100644 --- a/libnm-util/nm-utils.c +++ b/libnm-util/nm-utils.c @@ -1243,6 +1243,8 @@ nm_utils_security_valid (NMUtilsSecurityType type, || ((type == NMU_SEC_LEAP) && !adhoc)) { if (wifi_caps & (NM_WIFI_DEVICE_CAP_CIPHER_WEP40 | NM_WIFI_DEVICE_CAP_CIPHER_WEP104)) return TRUE; + else + return FALSE; } }