Commit 625aeb3a authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

Staging: wlan-ng: still setting wrong data

In commit 1ca1a92c "Staging: wlan-ng: memsetting the wrong amount of
data" I changed the code so we didn't memset() past the end of the
msg1.bssid.data[] array.  Walter Harms noticed that it was weird that
we were setting the len to 6 when there were 7 elements in the array.
Pavel Roskin pointed out that the intent of the code was actually to
memset() msg1.bssid.data.data[] which is a 6 character array.
Reported-by: default avatarWalter Harms <wharms@bfs.de>
Reported-by: default avatarPavel Roskin <proski@gnu.org>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7223e86d
...@@ -356,7 +356,7 @@ int prism2_scan(struct wiphy *wiphy, struct net_device *dev, ...@@ -356,7 +356,7 @@ int prism2_scan(struct wiphy *wiphy, struct net_device *dev,
msg1.msgcode = DIDmsg_dot11req_scan; msg1.msgcode = DIDmsg_dot11req_scan;
msg1.bsstype.data = P80211ENUM_bsstype_any; msg1.bsstype.data = P80211ENUM_bsstype_any;
memset(&msg1.bssid.data, 0xFF, sizeof(msg1.bssid.data)); memset(&msg1.bssid.data.data, 0xFF, sizeof(msg1.bssid.data.data));
msg1.bssid.data.len = 6; msg1.bssid.data.len = 6;
if (request->n_ssids > 0) { if (request->n_ssids > 0) {
......
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