3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-29 13:59:24 +01:00

netdev: Fix off-by-one error

rssi_levels_num should be able to hold a value of
L_ARRAY_SIZE(rssi_levels) (which is 16).  However, the maximum value is
15.
This commit is contained in:
Denis Kenzior 2017-05-30 11:31:14 -05:00
parent faa8dce6da
commit 3741c5aa6e

View File

@ -79,7 +79,7 @@ struct netdev {
struct l_timeout *neighbor_report_timeout; struct l_timeout *neighbor_report_timeout;
uint8_t prev_bssid[ETH_ALEN]; uint8_t prev_bssid[ETH_ALEN];
int8_t rssi_levels[16]; int8_t rssi_levels[16];
uint8_t rssi_levels_num : 4; uint8_t rssi_levels_num;
uint8_t cur_rssi_level_idx; uint8_t cur_rssi_level_idx;
int8_t cur_rssi; int8_t cur_rssi;