diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-03-16 23:21:45 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-17 15:21:18 +0900 |
commit | 6e9f6b54c51f23fd663912d720c3420c057e5bfc (patch) | |
tree | 093f84995429c7613a0b82a89ebf6d3a68284b56 /drivers/staging/wilc1000 | |
parent | fe3184556e2efc9472c73533af8d103058dd5190 (diff) |
staging: wilc1000: fix incorrect copy of pmkid data
The pmkid data is meant be be copied to the previous item in the
pmkidlist, however the code is just copying the data to itself because
the src index into pmkidlist is the same as the dst index into pmkidlist.
Fix this with i + 1 instead of i.
Detected by CoverityScan,CID#13339465 ("Overlapping buffer in memory copy")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000')
-rw-r--r-- | drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index a37896fcd683..4034f400fff9 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -1346,7 +1346,7 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev, priv->pmkid_list.pmkidlist[i + 1].bssid, ETH_ALEN); memcpy(priv->pmkid_list.pmkidlist[i].pmkid, - priv->pmkid_list.pmkidlist[i].pmkid, + priv->pmkid_list.pmkidlist[i + 1].pmkid, PMKID_LEN); } priv->pmkid_list.numpmkid--; |