mac80211: minstrel: avoid accessing negative indices in rix_to_ndx()
authorLuciano Coelho <luciano.coelho@nokia.com>
Fri, 3 Jul 2009 05:25:08 +0000 (08:25 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 7 Jul 2009 16:55:28 +0000 (12:55 -0400)
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: Luciano Coelho <luciano.coelho@nokia.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

No differences found