ath10k: fix out of bounds access to local buffer
authorMichael Mera <dev@michaelmera.com>
Mon, 24 Apr 2017 07:11:57 +0000 (16:11 +0900)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 4 May 2017 12:58:57 +0000 (15:58 +0300)
commita16703aaeaedec7a8bee5be5522c7c3e75478951
tree6ddbb235c2a6a41db0a5775d50f4accb1ee61691
parentd96db25d20256208ce47d71b9f673a1de4c6fd7e
ath10k: fix out of bounds access to local buffer

During write to debugfs file simulate_fw_crash, fixed-size local buffer
'buf' is accessed and modified at index 'count-1', where 'count' is the
size of the write (so potentially out of bounds).
This patch fixes this problem.

Signed-off-by: Michael Mera <dev@michaelmera.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/debug.c