From 4a9d0ebe4abb440f0d0a63a7e5520d99a8dc1a52 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 26 Apr 2014 11:20:37 +0300 Subject: [PATCH] Make PMKID check easier for static analyzers Checking sm->pmksa is sufficient here, but that seems to be too difficult for static analyzers to follow, so avoid false reports by explicitly checking pmkid as well. Signed-off-by: Jouni Malinen --- src/ap/wpa_auth_ie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ap/wpa_auth_ie.c b/src/ap/wpa_auth_ie.c index e957c6e92..1e4defcf1 100644 --- a/src/ap/wpa_auth_ie.c +++ b/src/ap/wpa_auth_ie.c @@ -675,7 +675,7 @@ int wpa_validate_wpa_ie(struct wpa_authenticator *wpa_auth, break; } } - if (sm->pmksa) { + if (sm->pmksa && pmkid) { wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_DEBUG, "PMKID found from PMKSA cache " "eap_type=%d vlan_id=%d",