From: Dan Carpenter Date: Tue, 28 Feb 2012 08:21:46 +0000 (+0300) Subject: Staging: wlan-ng: still setting wrong data X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=625aeb3abac00f36efc82077d56ae278093ce467;p=linux-beck.git Staging: wlan-ng: still setting wrong data In commit 1ca1a92cc6 "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: Walter Harms Reported-by: Pavel Roskin Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index d518b315b368..4cd3ba5d5646 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c @@ -356,7 +356,7 @@ int prism2_scan(struct wiphy *wiphy, struct net_device *dev, msg1.msgcode = DIDmsg_dot11req_scan; 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; if (request->n_ssids > 0) {