Fix writing of wpa_supplicant sae_groups configuration parameter
This integer array is zero terminated, so need to check the value is greater than 0 when writing the parameter. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
167f78a5e8
commit
9284418d00
1 changed files with 1 additions and 1 deletions
|
@ -1269,7 +1269,7 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
|
|||
if (config->sae_groups) {
|
||||
int i;
|
||||
fprintf(f, "sae_groups=");
|
||||
for (i = 0; config->sae_groups[i] >= 0; i++) {
|
||||
for (i = 0; config->sae_groups[i] > 0; i++) {
|
||||
fprintf(f, "%s%d", i > 0 ? " " : "",
|
||||
config->sae_groups[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue