aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/eapol_test.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-10-19 10:08:37 (GMT)
committerJouni Malinen <j@w1.fi>2013-10-19 10:08:37 (GMT)
commit94de082b39037a7877c61478d4efbcb5155d73ff (patch)
tree887a83be4a769c31838d9977f9a7ca0cf756e2e1 /wpa_supplicant/eapol_test.c
parentf07bba3255ab85353b565062e7e0511b52a138e4 (diff)
downloadhostap-94de082b39037a7877c61478d4efbcb5155d73ff.zip
hostap-94de082b39037a7877c61478d4efbcb5155d73ff.tar.gz
hostap-94de082b39037a7877c61478d4efbcb5155d73ff.tar.bz2
eapol_test: Initialize wpa_s->global to fix ctrl_iface
wpa_s->global is now dereferenced in number of places and at least one of them hits in eapol_test cases. Fix issues with this by setting the global pointer to empty data. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/eapol_test.c')
-rw-r--r--wpa_supplicant/eapol_test.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wpa_supplicant/eapol_test.c b/wpa_supplicant/eapol_test.c
index dad2765..a8b617e 100644
--- a/wpa_supplicant/eapol_test.c
+++ b/wpa_supplicant/eapol_test.c
@@ -1094,6 +1094,7 @@ static void usage(void)
int main(int argc, char *argv[])
{
+ struct wpa_global global;
struct wpa_supplicant wpa_s;
int c, ret = 1, wait_for_monitor = 0, save_config = 0;
char *as_addr = "127.0.0.1";
@@ -1230,7 +1231,9 @@ int main(int argc, char *argv[])
return -1;
}
+ os_memset(&global, 0, sizeof(global));
os_memset(&wpa_s, 0, sizeof(wpa_s));
+ wpa_s.global = &global;
eapol_test.wpa_s = &wpa_s;
wpa_s.conf = wpa_config_read(conf, NULL);
if (wpa_s.conf == NULL) {