]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix writing of wpa_supplicant sae_groups configuration parameter
authorJouni Malinen <j@w1.fi>
Sat, 7 Jan 2017 21:09:34 +0000 (23:09 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 7 Jan 2017 22:10:57 +0000 (00:10 +0200)
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>
wpa_supplicant/config_file.c

index 98e35915cebe3c296350ba22ef1608077c2aaa01..22b1665f70739d3deff250b5c8bf275894fc5ff9 100644 (file)
@@ -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]);
                }