[PATCH] Check WPA state machine for NULL in scan results processing

Dmitry Shmidt dimitrysh
Fri Apr 12 16:14:13 PDT 2013


Signed-off-by: Dmitry Shmidt <dimitrysh at google.com>
---
 src/rsn_supp/preauth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rsn_supp/preauth.c b/src/rsn_supp/preauth.c
index ab61867..f5138ed 100644
--- a/src/rsn_supp/preauth.c
+++ b/src/rsn_supp/preauth.c
@@ -416,7 +416,7 @@ void pmksa_candidate_add(struct wpa_sm *sm, const u8 *bssid,
  */
 int rsn_preauth_scan_results(struct wpa_sm *sm)
 {
-	if (sm->ssid_len == 0)
+	if (sm == NULL || sm->ssid_len == 0)
 		return -1;
 
 	/*
-- 
1.8.1.3




More information about the Hostap mailing list