aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-01-07 21:09:34 (GMT)
committerJouni Malinen <j@w1.fi>2017-01-07 22:10:57 (GMT)
commit9284418d00614d9187226d6352260c35ceee142c (patch)
tree3251cdabef440156a57dfe68e57ce1d92c88d7f4 /wpa_supplicant
parent167f78a5e8fa4736f433667a964c30536e5d6bc7 (diff)
downloadhostap-9284418d00614d9187226d6352260c35ceee142c.zip
hostap-9284418d00614d9187226d6352260c35ceee142c.tar.gz
hostap-9284418d00614d9187226d6352260c35ceee142c.tar.bz2
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>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/config_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 98e3591..22b1665 100644
--- a/wpa_supplicant/config_file.c
+++ b/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]);
}