From: Jouni Malinen Date: Sat, 26 Apr 2014 08:20:37 +0000 (+0300) Subject: Make PMKID check easier for static analyzers X-Git-Tag: hostap_2_2~219 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a9d0ebe4abb440f0d0a63a7e5520d99a8dc1a52;p=thirdparty%2Fhostap.git 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 --- 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",