瀏覽代碼

wireless: beyond ARRAY_SIZE of intf->crypto_stats

Do not go beyond ARRAY_SIZE of intf->crypto_stats

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Roel Kluin 16 年之前
父節點
當前提交
a6c6733978
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/wireless/rt2x00/rt2x00debug.c

+ 1 - 1
drivers/net/wireless/rt2x00/rt2x00debug.c

@@ -138,7 +138,7 @@ void rt2x00debug_update_crypto(struct rt2x00_dev *rt2x00dev,
 
 
 	if (cipher == CIPHER_TKIP_NO_MIC)
 	if (cipher == CIPHER_TKIP_NO_MIC)
 		cipher = CIPHER_TKIP;
 		cipher = CIPHER_TKIP;
-	if (cipher == CIPHER_NONE || cipher > CIPHER_MAX)
+	if (cipher == CIPHER_NONE || cipher >= CIPHER_MAX)
 		return;
 		return;
 
 
 	/* Remove CIPHER_NONE index */
 	/* Remove CIPHER_NONE index */