OSDN Git Service

staging: rtl8723bs: core: Replace sprintf with scnprintf
authorCandy Febriyanto <cfebriyanto@gmail.com>
Mon, 1 Mar 2021 14:58:17 +0000 (21:58 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Mar 2021 08:25:31 +0000 (09:25 +0100)
commit41b25593bc7e7df60e40a352b21f2ebfa9d9f53f
tree05bdb4912110ab4ac9d60ac9a3fe9b083a68da83
parent5fc95c4034d11f79595d2bcb4bc6fbe316fe51a1
staging: rtl8723bs: core: Replace sprintf with scnprintf

The use of sprintf with format string here means that there is a risk
that the writes will go out of bounds, replace it with scnprintf.

In on_action_public_default the variable "cnt" isn't being used for
anything meaningful so remove it.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Candy Febriyanto <cfebriyanto@gmail.com>
Link: https://lore.kernel.org/r/6c260641164d6856fc4447555fe739124cb27c19.1614610197.git.cfebriyanto@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c