]> git.baikalelectronics.ru Git - kernel.git/commit
ssb: Use scnprintf() for avoiding potential buffer overflow
authorTakashi Iwai <tiwai@suse.de>
Wed, 11 Mar 2020 09:17:39 +0000 (10:17 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 12 Mar 2020 13:44:12 +0000 (15:44 +0200)
commite99283cb2e09a28a8b2e224f802bc84f7d1051c5
tree0dd00994e407afa11c35bd4c7eb12e1255970c21
parent9afe29386687eddfa7162480d795798812e3e1ac
ssb: 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().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/ssb/sprom.c