ALSA: sis7019: Use safer strscpy() instead of strcpy()

Use a safer function strscpy() instead of strcpy() for copying to
arrays.

Only idiomatic code replacement, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250710100727.22653-84-tiwai@suse.de
This commit is contained in:
Takashi Iwai
2025-07-10 12:07:05 +02:00
parent a8b1aba400
commit b097bdf5e9

View File

@@ -868,7 +868,7 @@ static int sis_pcm_create(struct sis7019 *sis)
return rc;
pcm->private_data = sis;
strcpy(pcm->name, "SiS7019");
strscpy(pcm->name, "SiS7019");
sis->pcm = pcm;
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &sis_playback_ops);
@@ -1348,8 +1348,8 @@ static int __snd_sis7019_probe(struct pci_dev *pci,
if (rc < 0)
return rc;
strcpy(card->driver, "SiS7019");
strcpy(card->shortname, "SiS7019");
strscpy(card->driver, "SiS7019");
strscpy(card->shortname, "SiS7019");
rc = sis_chip_create(card, pci);
if (rc)
return rc;