mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
mesh: Simplify wpa_auth_pmksa_set_to_sm()
pmksa->pmk or pmksa->pmkid cannot be NULL since they are arrays. Remove the unnecessary NULL checks and use the provided pmksa pointer directly to simplify the implementation. (CID 138519) Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
32d4fe9549
commit
8854f90bad
@ -3393,13 +3393,9 @@ void wpa_auth_pmksa_set_to_sm(struct rsn_pmksa_cache_entry *pmksa,
|
||||
return;
|
||||
|
||||
sm->pmksa = pmksa;
|
||||
if (sm->pmksa->pmk)
|
||||
os_memcpy(pmk, sm->pmksa->pmk, PMK_LEN);
|
||||
if (sm->pmksa->pmkid) {
|
||||
os_memcpy(pmkid, sm->pmksa->pmkid, PMKID_LEN);
|
||||
os_memcpy(wpa_auth->dot11RSNAPMKIDUsed,
|
||||
sm->pmksa->pmkid, PMKID_LEN);
|
||||
}
|
||||
os_memcpy(pmk, pmksa->pmk, PMK_LEN);
|
||||
os_memcpy(pmkid, pmksa->pmkid, PMKID_LEN);
|
||||
os_memcpy(wpa_auth->dot11RSNAPMKIDUsed, pmksa->pmkid, PMKID_LEN);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user