]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: ctxfi: Replace deprecated strcpy() with strscpy()
authorBrahmajit Das <listout@listout.xyz>
Fri, 6 Jun 2025 20:40:00 +0000 (02:10 +0530)
committerTakashi Iwai <tiwai@suse.de>
Mon, 9 Jun 2025 07:53:30 +0000 (09:53 +0200)
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>
Link: https://patch.msgid.link/20250606204000.8156-1-listout@listout.xyz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ctxfi/xfi.c

index 713d36ea40cb5cd8bfc5b28165b3b94846aaabb9..d8dd84d41c87625673c75728ca0511bf2f06bb9e 100644 (file)
@@ -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);