mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
IBSS RSN: Explicitly check addr != NULL before passing it to memcmp
idx == 0 should be enough to make sure that the addr is set, but verify that this is indeed the case to avoid any potential issues if auth_set_key() gets called incorrectly.
This commit is contained in:
parent
2e320d8db5
commit
a416fb47eb
@ -261,7 +261,8 @@ static int auth_set_key(void *ctx, int vlan_id, enum wpa_alg alg,
|
||||
* In IBSS RSN, the pairwise key from the 4-way handshake
|
||||
* initiated by the peer with highest MAC address is used.
|
||||
*/
|
||||
if (os_memcmp(ibss_rsn->wpa_s->own_addr, addr, ETH_ALEN) < 0) {
|
||||
if (addr == NULL ||
|
||||
os_memcmp(ibss_rsn->wpa_s->own_addr, addr, ETH_ALEN) < 0) {
|
||||
wpa_printf(MSG_DEBUG, "AUTH: Do not use this PTK");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user