ath11k: Use scnprintf() for avoiding potential buffer overflow
authorTakashi Iwai <tiwai@suse.de>
Wed, 11 Mar 2020 08:47:07 +0000 (09:47 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 12 Mar 2020 08:21:14 +0000 (10:21 +0200)
commitbc8f237823bca96a879d17a96a4c2b1a10c38b6d
treeb4a03c7682ae2db2ab45af99daf9dace28c00821
parent5637c4ca961bc72ae3cce4bd5cbcecb5b8e32a54
ath11k: Use scnprintf() for avoiding potential buffer overflow

Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit.  Fix it by replacing with scnprintf().

Cc: ath11k@lists.infradead.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath11k/debug_htt_stats.c