rsi: add in missing RSI_FSM_STATES into array fsm_state
authorColin Ian King <colin.king@canonical.com>
Thu, 22 Jun 2017 16:58:04 +0000 (17:58 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 28 Jun 2017 17:54:14 +0000 (20:54 +0300)
Two recent commits added new RSI_FSM_STATES (namely FSM_FW_NOT_LOADED
and FSM_COMMON_DEV_PARAMS_SENT) and the corresponding table fsm_state
was not updated to match. This can lead to an array overrun when
accessing the latter two states in fsm_state. Fix this by adding in
the missing states.

Detected by CoverityScan, CID#1398379 ("Illegal address computation")

Fixes: 9920322ccd8e ("rsi: add tx frame for common device configuration")
Fixes: 015e367494c1 ("rsi: Register interrupt handler before firmware load")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rsi/rsi_91x_debugfs.c

index 828a042f903f19fef82eb09425f3e865e534f551..4c0a493bd44efc23ee8cd21890955a047051121f 100644 (file)
@@ -125,7 +125,9 @@ static int rsi_stats_read(struct seq_file *seq, void *data)
        struct rsi_common *common = seq->private;
 
        unsigned char fsm_state[][32] = {
+               "FSM_FW_NOT_LOADED",
                "FSM_CARD_NOT_READY",
+               "FSM_COMMON_DEV_PARAMS_SENT",
                "FSM_BOOT_PARAMS_SENT",
                "FSM_EEPROM_READ_MAC_ADDR",
                "FSM_RESET_MAC_SENT",