]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
staging: wilc1000: fix incorrect copy of pmkid data
authorColin Ian King <colin.king@canonical.com>
Thu, 16 Mar 2017 23:21:45 +0000 (23:21 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2017 06:21:18 +0000 (15:21 +0900)
commit6e9f6b54c51f23fd663912d720c3420c057e5bfc
tree093f84995429c7613a0b82a89ebf6d3a68284b56
parentfe3184556e2efc9472c73533af8d103058dd5190
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>
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c