]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Make PMKID check easier for static analyzers
authorJouni Malinen <j@w1.fi>
Sat, 26 Apr 2014 08:20:37 +0000 (11:20 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 29 Apr 2014 09:52:10 +0000 (12:52 +0300)
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 <j@w1.fi>
src/ap/wpa_auth_ie.c

index e957c6e920714b084c072428e61f2290c396634e..1e4defcf177425d5ec3cf5ed75c018cdc66e469f 100644 (file)
@@ -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",