[PATCH] staging: rtl8723bs: use strscpy() for ifname copy

From: Svyatoslav Nikolenko

Date: Wed Aug 26 2026 - 10:35:20 EST


Replace snprintf() with strscpy() when copying ifname into registry_par
to avoid unnecessary format specifier parsing.

Signed-off-by: Svyatoslav Nikolenko <nsvatoslav515@xxxxxxxxx>
---
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index f31196f54b3e..dd0c5fc813c8 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -256,7 +256,7 @@ static void loadparam(struct adapter *padapter, struct net_device *pnetdev)

registry_par->enable80211d = (u8)rtw_80211d;

- snprintf(registry_par->ifname, 16, "%s", ifname);
+ strscpy(registry_par->ifname, ifname, sizeof(registry_par->ifname));

registry_par->notch_filter = (u8)rtw_notch_filter;

--
2.47.3