mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 10:20:17 -04:00
ALSA: cs5535audio: 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-59-tiwai@suse.de
This commit is contained in:
@@ -315,9 +315,9 @@ static int __snd_cs5535audio_probe(struct pci_dev *pci,
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
strcpy(card->driver, DRIVER_NAME);
|
||||
strscpy(card->driver, DRIVER_NAME);
|
||||
|
||||
strcpy(card->shortname, "CS5535 Audio");
|
||||
strscpy(card->shortname, "CS5535 Audio");
|
||||
sprintf(card->longname, "%s %s at 0x%lx, irq %i",
|
||||
card->shortname, card->driver,
|
||||
cs5535au->port, cs5535au->irq);
|
||||
|
||||
@@ -423,7 +423,7 @@ int snd_cs5535audio_pcm(struct cs5535audio *cs5535au)
|
||||
|
||||
pcm->private_data = cs5535au;
|
||||
pcm->info_flags = 0;
|
||||
strcpy(pcm->name, "CS5535 Audio");
|
||||
strscpy(pcm->name, "CS5535 Audio");
|
||||
|
||||
snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
|
||||
&cs5535au->pci->dev,
|
||||
|
||||
Reference in New Issue
Block a user