mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 13:06:59 +02: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:
parent
2d5239eab8
commit
fe9502be46
|
|
@ -315,9 +315,9 @@ static int __snd_cs5535audio_probe(struct pci_dev *pci,
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
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",
|
sprintf(card->longname, "%s %s at 0x%lx, irq %i",
|
||||||
card->shortname, card->driver,
|
card->shortname, card->driver,
|
||||||
cs5535au->port, cs5535au->irq);
|
cs5535au->port, cs5535au->irq);
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,7 @@ int snd_cs5535audio_pcm(struct cs5535audio *cs5535au)
|
||||||
|
|
||||||
pcm->private_data = cs5535au;
|
pcm->private_data = cs5535au;
|
||||||
pcm->info_flags = 0;
|
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,
|
snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
|
||||||
&cs5535au->pci->dev,
|
&cs5535au->pci->dev,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user