ath9k: fix tx99 potential info leak
authorMiaoqing Pan <miaoqing@codeaurora.org>
Wed, 27 Sep 2017 01:13:34 +0000 (09:13 +0800)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 13 Oct 2017 11:40:57 +0000 (14:40 +0300)
commitee0a47186e2fa9aa1c56cadcea470ca0ba8c8692
tree429b8cb7c2975c35d5a5af2e595aeb2446de5153
parent2ea9f12cefe4b6bf291e1717512b0ccb04bf71e9
ath9k: fix tx99 potential info leak

When the user sets count to zero the string buffer would remain
completely uninitialized which causes the kernel to parse its
own stack data, potentially leading to an info leak. In addition
to that, the string might be not terminated properly when the
user data does not contain a 0-terminator.

Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
Reviewed-by: Christoph Böhmwalder <christoph@boehmwalder.at>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath9k/tx99.c