mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Cc: [email protected] Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
1206ff4ff9
commit
909bd5926d
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue