Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6646a664 authored by Zhu Yi's avatar Zhu Yi Committed by John W. Linville
Browse files

iwmc3200wifi: fix NULL pointer dereference in pmkid update



When handling IWM_CMD_PMKID_FLUSH command, the bssid and
pmkid in pmksa are all NULL. Check it before memcpy.

Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Acked-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 914828fa
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -970,7 +970,9 @@ int iwm_send_pmkid_update(struct iwm_priv *iwm,
	memset(&update, 0, sizeof(struct iwm_umac_pmkid_update));

	update.command = cpu_to_le32(command);
	if (pmksa->bssid)
		memcpy(&update.bssid, pmksa->bssid, ETH_ALEN);
	if (pmksa->pmkid)
		memcpy(&update.pmkid, pmksa->pmkid, WLAN_PMKID_LEN);

	ret = iwm_send_wifi_if_cmd(iwm, &update,