]> git.baikalelectronics.ru Git - kernel.git/commit
ath10k: fix possible out of bound access of ath10k_rates array
authorSriram R <srirrama@codeaurora.org>
Wed, 3 Oct 2018 03:13:50 +0000 (08:43 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 13 Oct 2018 17:15:32 +0000 (20:15 +0300)
commit3e15740b9436d78dfb64fa24dd3606d69a520240
tree789116b92732dde66f548ec7a89254af65336ba1
parenta43095a47e50a09fd95d5542b8cf1bd5181d25df
ath10k: fix possible out of bound access of ath10k_rates array

While using 'ath10k_mac_get_rate_hw_value()' to obtain the hw value
from the passed bitrate, there is a chance of out of bound array access
when wrong bitrate is passed. This is fixed by comparing the bitrates
within the correct size of the ath10k_rates array.

Fixes commit 48f303092c5a ("ath10k: add support for configuring management
packet rate"). Also correction made to some indents used in the above commit.

Signed-off-by: Sriram R <srirrama@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/mac.c