Skip to content

Commit

Permalink
Hostap: copying wrong data prism2_ioctl_giwaplist()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and John W. Linville committed Aug 9, 2013
1 parent 1206ff4 commit 909bd59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/hostap/hostap_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 909bd59

Please sign in to comment.