From: Adrian Bunk Date: Wed, 23 Apr 2008 09:51:28 +0000 (+0300) Subject: net/mac80211/rx.c: fix off-by-one X-Git-Tag: v2.6.26-rc1~1088^2~4^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13d8fd2d15fdd492078bedb9fde87c901a4e4df0;p=linux-2.6 net/mac80211/rx.c: fix off-by-one This patch fixes an off-by-one in net/mac80211/rx.c introduced by commit 8318d78a44d49ac1edf2bdec7299de3617c4232e (cfg80211 API for channels/bitrates, mac80211 and driver conversion) and spotted by the Coverity checker. Signed-off-by: Adrian Bunk Signed-off-by: John W. Linville --- diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 52e4554fdd..02f436a860 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2170,7 +2170,7 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_supported_band *sband; if (status->band < 0 || - status->band > IEEE80211_NUM_BANDS) { + status->band >= IEEE80211_NUM_BANDS) { WARN_ON(1); return; }