1
0
Fork 0

staging: wilc1000: off by one in wilc_wfi_cfg80211_mgmt_types

NL80211_IFTYPE_MAX represents the largest interface type number defined,
so declaring the array with that size will actually leave out the last
interface.

This causes invalid memory access whenever this array is used, which starts
happening at boot.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Sasha Levin 2015-05-28 11:03:56 -04:00 committed by Greg Kroah-Hartman
parent 691f1a2f03
commit adf1b358a9
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ static const u32 cipher_suites[] = {
};
static const struct ieee80211_txrx_stypes
wilc_wfi_cfg80211_mgmt_types[NL80211_IFTYPE_MAX] = {
wilc_wfi_cfg80211_mgmt_types[NUM_NL80211_IFTYPES] = {
[NL80211_IFTYPE_STATION] = {
.tx = 0xffff,
.rx = BIT(IEEE80211_STYPE_ACTION >> 4) |