projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8817633
)
Staging: wlan-ng: cap the ssid length
author
Dan Carpenter
<
[email protected]
>
Tue, 31 Jan 2012 08:45:15 +0000
(11:45 +0300)
committer
Greg Kroah-Hartman
<
[email protected]
>
Thu, 9 Feb 2012 17:51:47 +0000
(09:51 -0800)
We're getting the ssid length from the scan here. Let's cap it before
doing the memcpy().
Signed-off-by: Dan Carpenter <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/wlan-ng/prism2mgmt.c
patch
|
blob
|
history
diff --git
a/drivers/staging/wlan-ng/prism2mgmt.c
b/drivers/staging/wlan-ng/prism2mgmt.c
index 6675c8226cefcc0b260517164e0835567fa7b1d5..c3bb05dd744fd5a0a81a811d67fa3b4e2d9fdfa7 100644
(file)
--- a/
drivers/staging/wlan-ng/prism2mgmt.c
+++ b/
drivers/staging/wlan-ng/prism2mgmt.c
@@
-406,6
+406,7
@@
int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp)
/* SSID */
req->ssid.status = P80211ENUM_msgitem_status_data_ok;
req->ssid.data.len = le16_to_cpu(item->ssid.len);
+ req->ssid.data.len = min_t(u16, req->ssid.data.len, WLAN_BSSID_LEN);
memcpy(req->ssid.data.data, item->ssid.data, req->ssid.data.len);
/* supported rates */