diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-08-09 05:52:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-09 14:01:21 -0400 |
commit | 909bd5926d474e275599094acad986af79671ac9 (patch) | |
tree | 0b835315a3adb9468e09d505652a7352bea01fbb /drivers/net/wireless/hostap | |
parent | 1206ff4ff9d2ef7468a355328bc58ac6ebf5be44 (diff) |
Hostap: copying wrong data prism2_ioctl_giwaplist()
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>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/hostap')
-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 ac074731335a..e5090309824e 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, | |||
523 | 523 | ||
524 | data->length = prism2_ap_get_sta_qual(local, addr, qual, IW_MAX_AP, 1); | 524 | data->length = prism2_ap_get_sta_qual(local, addr, qual, IW_MAX_AP, 1); |
525 | 525 | ||
526 | memcpy(extra, &addr, sizeof(struct sockaddr) * data->length); | 526 | memcpy(extra, addr, sizeof(struct sockaddr) * data->length); |
527 | data->flags = 1; /* has quality information */ | 527 | data->flags = 1; /* has quality information */ |
528 | memcpy(extra + sizeof(struct sockaddr) * data->length, &qual, | 528 | memcpy(extra + sizeof(struct sockaddr) * data->length, qual, |
529 | sizeof(struct iw_quality) * data->length); | 529 | sizeof(struct iw_quality) * data->length); |
530 | 530 | ||
531 | kfree(addr); | 531 | kfree(addr); |