mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
WPS: Use more defensive design to avoid theoretical NULL deref
Prior to commit 6195adda9b
the sm->user
dereference did not exist here. While this is in practice non-NULL,
better use more defensive construction here to avoid NULL pointer
dereference should this ever change.
This commit is contained in:
parent
a745b7a775
commit
cce1f698e5
@ -128,10 +128,11 @@ static void * eap_wsc_init(struct eap_sm *sm)
|
||||
wpa_printf(MSG_DEBUG, "EAP-WSC: No AP PIN (password) "
|
||||
"configured for Enrollee functionality - "
|
||||
"allow for probing capabilities (M1)");
|
||||
}
|
||||
} else {
|
||||
cfg.pin = sm->user->password;
|
||||
cfg.pin_len = sm->user->password_len;
|
||||
}
|
||||
}
|
||||
cfg.assoc_wps_ie = sm->assoc_wps_ie;
|
||||
cfg.peer_addr = sm->peer_addr;
|
||||
if (0 /* TODO: could provide option for forcing PSK format */)
|
||||
|
Loading…
Reference in New Issue
Block a user