From: Svyatoslav Nikolenko <nsvatoslav515@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Svyatoslav Nikolenko <nsvatoslav515@gmail.com>
Subject: [PATCH] staging: rtl8723bs: use strscpy() for ifname copy
Date: Wed, 26 Aug 2026 17:34:18 +0300 [thread overview]
Message-ID: <20260826143418.5713-1-nsvatoslav515@gmail.com> (raw)
Replace snprintf() with strscpy() when copying ifname into registry_par
to avoid unnecessary format specifier parsing.
Signed-off-by: Svyatoslav Nikolenko <nsvatoslav515@gmail.com>
---
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
next reply other threads:[~2026-08-26 14:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 14:34 Svyatoslav Nikolenko [this message]
2026-09-01 10:09 ` [PATCH] staging: rtl8723bs: use strscpy() for ifname copy Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260826143418.5713-1-nsvatoslav515@gmail.com \
--to=nsvatoslav515@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.