diff --git a/ChangeLog b/ChangeLog index a4d73e6b0..e1ade5960 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-01-11 Robert Love + + * gnome/applet/wireless-security-manager.c: Fix crash by not asserting + that wso_foo_new() returned non-NULL. Instead, only append the new + wso to wsm->options if the wso is non-NULL. The crux is that we + assume that the relevant key types are implied by WEP and WPA as + appropriate. To be sure, they should be, but we should not expect + drivers to not be oozing piles of wolf fecal matter. + 2006-01-11 Robert Love * configure.in: Add the gcc flags '-Wshadow' and '-Wfloat-equal'. diff --git a/gnome/applet/wireless-security-manager.c b/gnome/applet/wireless-security-manager.c index 66ac1b672..46b344a45 100644 --- a/gnome/applet/wireless-security-manager.c +++ b/gnome/applet/wireless-security-manager.c @@ -70,35 +70,35 @@ void wsm_set_capabilities (WirelessSecurityManager *wsm, guint32 capabilities) if (capabilities & NM_802_11_CAP_PROTO_NONE) { opt = wso_none_new (wsm->glade_file); - g_assert (opt); - wsm->options = g_slist_append (wsm->options, opt); + if (opt) + wsm->options = g_slist_append (wsm->options, opt); } if (capabilities & NM_802_11_CAP_PROTO_WEP) { opt = wso_wep_passphrase_new (wsm->glade_file); - g_assert (opt); - wsm->options = g_slist_append (wsm->options, opt); + if (opt) + wsm->options = g_slist_append (wsm->options, opt); opt = wso_wep_hex_new (wsm->glade_file); - g_assert (opt); - wsm->options = g_slist_append (wsm->options, opt); + if (opt) + wsm->options = g_slist_append (wsm->options, opt); opt = wso_wep_ascii_new (wsm->glade_file); - g_assert (opt); - wsm->options = g_slist_append (wsm->options, opt); + if (opt) + wsm->options = g_slist_append (wsm->options, opt); } if ( (capabilities & NM_802_11_CAP_PROTO_WPA) || (capabilities & NM_802_11_CAP_PROTO_WPA2)) { opt = wso_wpa_psk_passphrase_new (wsm->glade_file, capabilities); - g_assert (opt); - wsm->options = g_slist_append (wsm->options, opt); + if (opt) + wsm->options = g_slist_append (wsm->options, opt); opt = wso_wpa_psk_hex_new (wsm->glade_file, capabilities); - g_assert (opt); - wsm->options = g_slist_append (wsm->options, opt); + if (opt) + wsm->options = g_slist_append (wsm->options, opt); } }