]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - build-utilities/hostap.git/commitdiff
Fix crash when a local deauth occurs (squash) p2p-upstream-android
authorEyal Shapira <eyal@wizery.com>
Thu, 15 Mar 2012 21:21:32 +0000 (23:21 +0200)
committerEyal Shapira <eyal@wizery.com>
Thu, 15 Mar 2012 21:21:32 +0000 (23:21 +0200)
The check added in "Ignore a deauth from a different BSS than the current one"
didn't account for addr being null which may happen when the deauth
is locally generated.

wpa_supplicant/events.c

index d33cb35e71594f63bbc2fc683fc4d5250d70ef7d..191748a8afe89bf3bc561e8b8d9e8eb85d40bd36 100644 (file)
@@ -1665,7 +1665,7 @@ static void wpa_supplicant_event_disassoc(struct wpa_supplicant *wpa_s,
                return;
        }
 
                return;
        }
 
-       if (os_memcmp(wpa_s->bssid, addr, ETH_ALEN)) {
+       if (addr && wpa_s->bssid && os_memcmp(wpa_s->bssid, addr, ETH_ALEN)) {
                /* This may occur during roaming */
                wpa_dbg(wpa_s, MSG_DEBUG, "Ignore disconnect from"
                        " a BSS which is not the current one");
                /* This may occur during roaming */
                wpa_dbg(wpa_s, MSG_DEBUG, "Ignore disconnect from"
                        " a BSS which is not the current one");