]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit05c69e42a868abc84644605943819302217e530f
tree4a95c1e04dc33090cb7562be27c49b8ec77558da
parent827e207b043273486630b3a14acab229a6bfe649
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