linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k: Read outside array bounds
@ 2009-07-25 21:21 Roel Kluin
  2009-07-27 17:41 ` Luis R. Rodriguez
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-07-25 21:21 UTC (permalink / raw)
  To: lrodriguez, linux-wireless, ath9k-devel, Andrew Morton

Incorrect limits leads to reads outside array bounds.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
index a2fda70..ce0e86c 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom.c
@@ -460,7 +460,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah)
 		integer = swab32(eep->modalHeader.antCtrlCommon);
 		eep->modalHeader.antCtrlCommon = integer;
 
-		for (i = 0; i < AR5416_MAX_CHAINS; i++) {
+		for (i = 0; i < AR5416_EEP4K_MAX_CHAINS; i++) {
 			integer = swab32(eep->modalHeader.antCtrlChain[i]);
 			eep->modalHeader.antCtrlChain[i] = integer;
 		}
@@ -914,7 +914,7 @@ static void ath9k_hw_set_4k_power_per_rate_table(struct ath_hw *ah,
 			ctlMode, numCtlModes, isHt40CtlMode,
 			(pCtlMode[ctlMode] & EXT_ADDITIVE));
 
-		for (i = 0; (i < AR5416_NUM_CTLS) &&
+		for (i = 0; (i < AR5416_EEP4K_NUM_CTLS) &&
 				pEepData->ctlIndex[i]; i++) {
 			DPRINTF(ah->ah_sc, ATH_DBG_EEPROM,
 				"  LOOP-Ctlidx %d: cfgCtl 0x%2.2x "

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ath9k: Read outside array bounds
  2009-07-25 21:21 [PATCH] ath9k: Read outside array bounds Roel Kluin
@ 2009-07-27 17:41 ` Luis R. Rodriguez
  0 siblings, 0 replies; 2+ messages in thread
From: Luis R. Rodriguez @ 2009-07-27 17:41 UTC (permalink / raw)
  To: Roel Kluin; +Cc: linux-wireless, ath9k-devel, Andrew Morton

On Sat, Jul 25, 2009 at 2:21 PM, Roel Kluin<roel.kluin@gmail.com> wrote:
> Incorrect limits leads to reads outside array bounds.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>

Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>

  Luis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-27 17:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-25 21:21 [PATCH] ath9k: Read outside array bounds Roel Kluin
2009-07-27 17:41 ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).