Commit 909bd592 authored by Dan Carpenter's avatar Dan Carpenter Committed by John W. Linville

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1206ff4f
...@@ -523,9 +523,9 @@ static int prism2_ioctl_giwaplist(struct net_device *dev, ...@@ -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); 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 */ 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); sizeof(struct iw_quality) * data->length);
kfree(addr); kfree(addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment