From b8df43dec61646812ecab5bb46f6aa369e6267e0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 14 Feb 2013 18:23:33 +0200 Subject: [PATCH] TDLS: Fix add/set STA operation Commit a9a1d0f08aaf7c96f40def0d7966399b89b2a7c0 added vht_capabilities to struct hostapd_sta_add_params but forgot to update wpa_supplicant_tdls_peer_addset() to initialize the variable to NULL. This could result in uninitialized pointer being used in driver_nl80211.c when adding a TDLS peer entry. Fix this by clearing the hostapd_sta_add_params with memset. Signed-hostap: Jouni Malinen --- wpa_supplicant/wpas_glue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c index 4859774f6..e5e1f42df 100644 --- a/wpa_supplicant/wpas_glue.c +++ b/wpa_supplicant/wpas_glue.c @@ -557,6 +557,8 @@ static int wpa_supplicant_tdls_peer_addset( struct wpa_supplicant *wpa_s = ctx; struct hostapd_sta_add_params params; + os_memset(¶ms, 0, sizeof(params)); + params.addr = peer; params.aid = 1; params.capability = capability;