ath6kl: Check for valid rate table index
authorRaja Mani <rmani@qca.qualcomm.com>
Fri, 21 Sep 2012 09:38:54 +0000 (15:08 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 24 Oct 2012 08:49:50 +0000 (11:49 +0300)
commitd54601b92fbde2a7021a844e1373ba8c778cc0a3
tree434ba2da87ab1916a4b3dfccc2362b0a166b970f
parent43a06b346d1350009c8f7eaa1a2a137395874ca0
ath6kl: Check for valid rate table index

There are 28 items defined in rate table array 'wmi_rate_tbl'.
The rate table index (reply->rate_index) in ath6kl_wmi_bitrate_reply_rx()
func is not checked for the valid max limit index before accessing
rate table array. There may be some incidents to get memory crashes
without safe max check. Fix this.

Found this on code review.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/wmi.c