From 95cb2d88e9e2a37b97e0b06e408b0056f6efabae Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 14 Apr 2011 19:50:26 +0300 Subject: [PATCH] TDLS: Verify that scan results for BSS are available before using them --- wpa_supplicant/wpa_supplicant.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 2c5a20c62..c4f07d3fd 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -1100,7 +1100,9 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, } #ifdef CONFIG_TDLS - wpa_tdls_ap_ies(wpa_s->wpa, (const u8 *) (bss + 1), bss->ie_len); + if (bss) + wpa_tdls_ap_ies(wpa_s->wpa, (const u8 *) (bss + 1), + bss->ie_len); #endif /* CONFIG_TDLS */ if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&