aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-01-02 19:50:22 (GMT)
committerJouni Malinen <j@w1.fi>2009-01-02 19:50:22 (GMT)
commit243869858a1294f679d23324734e85050aa5d27d (patch)
tree0fce39f4f4ae9bdde121333a320e524afcb35319 /wpa_supplicant
parent862e08a9a4d9ad6632f12569960edcd7a51e6cb7 (diff)
downloadhostap-06-243869858a1294f679d23324734e85050aa5d27d.zip
hostap-06-243869858a1294f679d23324734e85050aa5d27d.tar.gz
hostap-06-243869858a1294f679d23324734e85050aa5d27d.tar.bz2
Initialize wpa_ie_len to 0 if WPA IE is not set on all paths
The new WPS code was not setting this in error case.
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_supplicant.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 0fb70c3..04995cf 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1027,7 +1027,8 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
if (wps_ie && wpabuf_len(wps_ie) <= sizeof(wpa_ie)) {
wpa_ie_len = wpabuf_len(wps_ie);
os_memcpy(wpa_ie, wpabuf_head(wps_ie), wpa_ie_len);
- }
+ } else
+ wpa_ie_len = 0;
wpabuf_free(wps_ie);
wpa_supplicant_set_non_wpa_policy(wpa_s, ssid);
#endif /* CONFIG_WPS */