]> git.baikalelectronics.ru Git - kernel.git/commit
prism54: Use scnprintf() for avoiding potential buffer overflow
authorTakashi Iwai <tiwai@suse.de>
Wed, 11 Mar 2020 08:47:13 +0000 (09:47 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 12 Mar 2020 13:43:41 +0000 (15:43 +0200)
commit9c30a62dc9c022f32e0aa15cc28d7db386bcf479
tree6094b7c7aa53eac28e96b1cdbf1bdfc4a0284ea6
parent3660eb0b88faec918c2d3b53bbb15504223ac6ec
prism54: 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: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/intersil/prism54/oid_mgt.c