]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SME: Handle association without own extra IEs
authorJouni Malinen <j@w1.fi>
Sun, 11 Apr 2010 09:19:02 +0000 (12:19 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 11 Apr 2010 09:19:02 +0000 (12:19 +0300)
Need to check for this before calling ieee802_11_parse_elems().

wpa_supplicant/sme.c

index 32c35be87a1184e37b8e78e2b6f0a6e1dde42201..c66e5225defc7e4adae04b5d8edab0c417286fc0 100644 (file)
@@ -324,7 +324,8 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
 
        wpa_supplicant_set_state(wpa_s, WPA_ASSOCIATING);
 
-       if (ieee802_11_parse_elems(params.wpa_ie, params.wpa_ie_len, &elems, 0)
+       if (params.wpa_ie == NULL ||
+           ieee802_11_parse_elems(params.wpa_ie, params.wpa_ie_len, &elems, 0)
            < 0) {
                wpa_printf(MSG_DEBUG, "SME: Could not parse own IEs?!");
                os_memset(&elems, 0, sizeof(elems));