mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-31 01:04:03 -05:00
Fix SAE group selection in an error case
The sae_groups parameter is zero terminated array, not -1 terminated, so must check the value against <= 0 to break out from the loop. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
3dce85ceb0
commit
04e6c4cc50
@ -67,7 +67,7 @@ static int sme_set_sae_group(struct wpa_supplicant *wpa_s)
|
|||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int group = groups[wpa_s->sme.sae_group_index];
|
int group = groups[wpa_s->sme.sae_group_index];
|
||||||
if (group < 0)
|
if (group <= 0)
|
||||||
break;
|
break;
|
||||||
if (sae_set_group(&wpa_s->sme.sae, group) == 0) {
|
if (sae_set_group(&wpa_s->sme.sae, group) == 0) {
|
||||||
wpa_dbg(wpa_s, MSG_DEBUG, "SME: Selected SAE group %d",
|
wpa_dbg(wpa_s, MSG_DEBUG, "SME: Selected SAE group %d",
|
||||||
|
Loading…
Reference in New Issue
Block a user