Browse Source

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>
Jouni Malinen 8 years ago
parent
commit
9284418d00
1 changed files with 1 additions and 1 deletions
  1. 1 1
      wpa_supplicant/config_file.c

+ 1 - 1
wpa_supplicant/config_file.c

@@ -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]);
 		}