]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8723bs: Use scnprintf() for avoiding potential buffer overflow
authorTakashi Iwai <tiwai@suse.de>
Wed, 11 Mar 2020 09:24:51 +0000 (10:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 08:23:59 +0000 (09:23 +0100)
commitb34d12a4aafdc31a8eca41288ae991c02df8b01c
treeda814504a2931ccea15b5ab002097ad6b7dbf84b
parentf332737806ff23ceb2352a98bf878882f425a999
staging: rtl8723bs: 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-4-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_wlan_util.c
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c