diff options
author | Zhu Yi <yi.zhu@intel.com> | 2009-11-30 22:48:50 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-04 14:16:24 -0500 |
commit | 6646a664e3b60bf3e5db676e0626e6ccd71b3363 (patch) | |
tree | c927584b8da07df05e9e0d1c6fe710613feedd02 /drivers/net | |
parent | 914828fad09269292be1bfa3dfbe78d064f76068 (diff) |
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: Zhu Yi <yi.zhu@intel.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/commands.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/commands.c b/drivers/net/wireless/iwmc3200wifi/commands.c index bd0630755b32..89b33fa8d4ef 100644 --- a/drivers/net/wireless/iwmc3200wifi/commands.c +++ b/drivers/net/wireless/iwmc3200wifi/commands.c | |||
@@ -970,8 +970,10 @@ int iwm_send_pmkid_update(struct iwm_priv *iwm, | |||
970 | memset(&update, 0, sizeof(struct iwm_umac_pmkid_update)); | 970 | memset(&update, 0, sizeof(struct iwm_umac_pmkid_update)); |
971 | 971 | ||
972 | update.command = cpu_to_le32(command); | 972 | update.command = cpu_to_le32(command); |
973 | memcpy(&update.bssid, pmksa->bssid, ETH_ALEN); | 973 | if (pmksa->bssid) |
974 | memcpy(&update.pmkid, pmksa->pmkid, WLAN_PMKID_LEN); | 974 | memcpy(&update.bssid, pmksa->bssid, ETH_ALEN); |
975 | if (pmksa->pmkid) | ||
976 | memcpy(&update.pmkid, pmksa->pmkid, WLAN_PMKID_LEN); | ||
975 | 977 | ||
976 | ret = iwm_send_wifi_if_cmd(iwm, &update, | 978 | ret = iwm_send_wifi_if_cmd(iwm, &update, |
977 | sizeof(struct iwm_umac_pmkid_update), 0); | 979 | sizeof(struct iwm_umac_pmkid_update), 0); |