summaryrefslogtreecommitdiff
path: root/sys/external/isc
diff options
context:
space:
mode:
authorbouyer <bouyer@NetBSD.org>2012-03-15 18:49:49 +0000
committerbouyer <bouyer@NetBSD.org>2012-03-15 18:49:49 +0000
commit9b2a2db56c18a623efdf74dc3ca2d3f37691853d (patch)
tree913a5b8bca18a1200ef23720fa967ea51acb1f49 /sys/external/isc
parent468c60f61c7c1b2ff010a08ab5e67d803d7b4287 (diff)
Use the right marcro for loop bound, avoids read past array end. Found by
gcc -03
Diffstat (limited to 'sys/external/isc')
-rw-r--r--sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c b/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c
index 764a6a958aa..23da0315fac 100644
--- a/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c
+++ b/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c
@@ -239,7 +239,7 @@ v4kEepromReadCTLInfo(struct ath_hal *ah, HAL_EEPROM_v4k *ee)
HALASSERT(AR5416_4K_NUM_CTLS <= sizeof(ee->ee_rdEdgesPower)/NUM_EDGES);
for (i = 0; ee->ee_base.ctlIndex[i] != 0 && i < AR5416_4K_NUM_CTLS; i++) {
- for (j = 0; j < NUM_EDGES; j ++) {
+ for (j = 0; j < AR5416_4K_NUM_BAND_EDGES; j ++) {
/* XXX Confirm this is the right thing to do when an invalid channel is stored */
if (ee->ee_base.ctlData[i].ctlEdges[CTL_CHAIN][j].bChannel == AR5416_BCHAN_UNUSED) {
rep[j].rdEdge = 0;