Skip to content
Commit 3938b45c authored by Luciano Coelho's avatar Luciano Coelho Committed by John W. Linville
Browse files

mac80211: minstrel: avoid accessing negative indices in rix_to_ndx()



If rix is not found in mi->r[], i will become -1 after the loop.  This value
is eventually used to access arrays, so we were accessing arrays with a
negative index, which is obviously not what we want to do.  This patch fixes
this potential problem.

Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Acked-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2dce4c2b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment