]> git.baikalelectronics.ru Git - kernel.git/commit
edd: Use scnprintf() for avoiding potential buffer overflow
authorTakashi Iwai <tiwai@suse.de>
Fri, 20 Mar 2020 08:44:29 +0000 (09:44 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 2 Apr 2020 18:42:29 +0000 (20:42 +0200)
commitf06e2ece0235a14fd8284fd1e6446708184e3169
tree6acbf0163b9acb1f88994fee0e9dec92960d2fd1
parent3bffade354a3950c8545ab33d356080a8b8f99ed
edd: 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().

Link: https://lore.kernel.org/r/20200320084429.1803-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
drivers/firmware/edd.c