]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit94c97ec1210689d10cdcd5d2a9a6fcd8dafb7a26
treeb4a03c7682ae2db2ab45af99daf9dace28c00821
parenta327c486df901cf3163ce867cfcb2272b77bb7ee
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