staging: rtl8188eu: Use scnprintf() for avoiding potential buffer overflow
authorTakashi Iwai <tiwai@suse.de>
Wed, 11 Mar 2020 09:24:49 +0000 (10:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 08:23:59 +0000 (09:23 +0100)
commit72e7375cafc12eaac17f774872fd24f4de1a5c07
tree96282f9c3fccca694e435ab6cdcd55a132a470d7
parent234ff54287c1ce1d92eb807eb285adceb1c86b8c
staging: rtl8188eu: 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>
Link: https://lore.kernel.org/r/20200311092451.23933-2-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_debug.c
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c