Merge pull request #55 from biergaizi/master
authorAdrian Chadd <adrian.chadd@gmail.com>
Fri, 23 May 2014 16:01:03 +0000 (09:01 -0700)
committerAdrian Chadd <adrian.chadd@gmail.com>
Fri, 23 May 2014 16:01:03 +0000 (09:01 -0700)
Fix Array Out of Bounds in rcSibUpdate_ht()

target_firmware/wlan/ratectrl.h
target_firmware/wlan/ratectrl_11n_ln.c

index 3b3f5eaf0518f3ae6b26ccc0465123d5d2a6fc9d..08b545795ba27e89b3637fa9355377ec73b81972 100755 (executable)
@@ -117,10 +117,8 @@ enum {
 
 #ifdef MAGPIE_MERLIN  
 #define MAX_TX_RATE_TBL         46
-#define MAX_TX_RATE_PHY         48
 #else
 #define MAX_TX_RATE_TBL         54//46
-#define MAX_TX_RATE_PHY         56//48
 #endif
 
 /*
index 277b1843c1f669770bc1c68f96edbf7071f36620..de10a2757055ccd91d232d1f1aea07560165be1c 100755 (executable)
@@ -369,7 +369,7 @@ rcSibUpdate_ht(struct ath_softc_tgt *sc, struct ath_node_target *an,
        rcInitValidTxMask(pRc);
 
        for (i = 0; i < WLAN_RC_PHY_MAX; i++) {
-               for (j = 0; j < MAX_TX_RATE_PHY; j++) {
+               for (j = 0; j < MAX_TX_RATE_TBL; j++) {
                        mPhyCtrlState.validPhyRateIndex[i][j] = 0;
                }   
                mPhyCtrlState.validPhyRateCount[i] = 0;