Commit adf1b358 authored by Sasha Levin's avatar Sasha Levin Committed by Greg Kroah-Hartman

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: default avatarSasha Levin <sasha.levin@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 691f1a2f
......@@ -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) |
......
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