diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-08-09 12:52:31 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-29 09:47:38 -0700 |
commit | 9e50b0dd45dd3a26edf83b3f78117a6765fbe8a2 (patch) | |
tree | 842ca1f7875f92725ae89d0f3ccdd1459fc3504e /drivers/net | |
parent | 2650a684ca1c26831ecc552c269ffd7a8def3694 (diff) | |
download | linux-3.10-9e50b0dd45dd3a26edf83b3f78117a6765fbe8a2.tar.gz linux-3.10-9e50b0dd45dd3a26edf83b3f78117a6765fbe8a2.tar.bz2 linux-3.10-9e50b0dd45dd3a26edf83b3f78117a6765fbe8a2.zip |
Hostap: copying wrong data prism2_ioctl_giwaplist()
commit 909bd5926d474e275599094acad986af79671ac9 upstream.
We want the data stored in "addr" and "qual", but the extra ampersands
mean we are copying stack data instead.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c index ac074731335..e5090309824 100644 --- a/drivers/net/wireless/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/hostap/hostap_ioctl.c @@ -523,9 +523,9 @@ static int prism2_ioctl_giwaplist(struct net_device *dev, data->length = prism2_ap_get_sta_qual(local, addr, qual, IW_MAX_AP, 1); - memcpy(extra, &addr, sizeof(struct sockaddr) * data->length); + memcpy(extra, addr, sizeof(struct sockaddr) * data->length); data->flags = 1; /* has quality information */ - memcpy(extra + sizeof(struct sockaddr) * data->length, &qual, + memcpy(extra + sizeof(struct sockaddr) * data->length, qual, sizeof(struct iw_quality) * data->length); kfree(addr); |