* [PATCH 1/1] ALSA: ctxfi: Replace deprecated strcpy() with strscpy()
@ 2025-06-06 20:40 Brahmajit Das
2025-06-09 7:53 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Brahmajit Das @ 2025-06-06 20:40 UTC (permalink / raw)
To: linux-kernel, linux-sound; +Cc: wychay, tiwai, perex
strcpy() is deprecated; use strscpy() instead. Use strscpy() to copy the
long name because there's no string to format with sprintf().
No functional changes intended.
Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Brahmajit Das <listout@listout.xyz>
---
sound/pci/ctxfi/xfi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/pci/ctxfi/xfi.c b/sound/pci/ctxfi/xfi.c
index 713d36ea40cb..d8dd84d41c87 100644
--- a/sound/pci/ctxfi/xfi.c
+++ b/sound/pci/ctxfi/xfi.c
@@ -98,8 +98,8 @@ ct_card_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
if (err < 0)
goto error;
- strcpy(card->driver, "SB-XFi");
- strcpy(card->shortname, "Creative X-Fi");
+ strscpy(card->driver, "SB-XFi");
+ strscpy(card->shortname, "Creative X-Fi");
snprintf(card->longname, sizeof(card->longname), "%s %s %s",
card->shortname, atc->chip_name, atc->model_name);
--
2.49.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-09 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-06 20:40 [PATCH 1/1] ALSA: ctxfi: Replace deprecated strcpy() with strscpy() Brahmajit Das
2025-06-09 7:53 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox