]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: wlan-ng: memsetting the wrong amount of data
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 21 Feb 2012 14:18:38 +0000 (17:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Feb 2012 20:03:13 +0000 (12:03 -0800)
commitb6c6f580cdf9e91d51e938504eb68adb55406aee
treea058acb43f83a0cf1d63425db49fc5a152a819d0
parent4e71932c498325637dc2a85bc34ece7ad8dc3fea
Staging: wlan-ng: memsetting the wrong amount of data

p80211item_pstr6_t is the size of "msg1.bssid" (16 bytes) but
msg1.bssid.data is type p80211pstr6_t and it is smaller (7 bytes).  We
had just set that memory to zeroes earlier and now we're writing over it
with 0xff because we're writing past the end of the struct.

I don't know if this actually causes a problem.  It may be that we
initialize the extra 0xff bytes correctly later.  But the current code
is obviously wrong and we should fix it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/cfg80211.c