From: Eyal Shapira Date: Thu, 15 Mar 2012 21:21:32 +0000 (+0200) Subject: Fix crash when a local deauth occurs (squash) X-Git-Url: https://git.ti.com/gitweb?p=build-utilities%2Fhostap.git;a=commitdiff_plain;h=HEAD Fix crash when a local deauth occurs (squash) 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. --- diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index d33cb35e..191748a8 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1665,7 +1665,7 @@ static void wpa_supplicant_event_disassoc(struct wpa_supplicant *wpa_s, 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");