OSDN Git Service

staging: rtl8723bs: hal: Replace sprintf with scnprintf
authorCandy Febriyanto <cfebriyanto@gmail.com>
Mon, 1 Mar 2021 15:01:50 +0000 (22:01 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Mar 2021 08:25:32 +0000 (09:25 +0100)
commit2a02059e4f9ed59817d8c238f93bb8e5c58562ad
tree4a95c1e04dc33090cb7562be27c49b8ec77558da
parent41b25593bc7e7df60e40a352b21f2ebfa9d9f53f
staging: rtl8723bs: hal: 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.

Also avoid unnecessarily passing "%s" on some of the function calls.

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