mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 11:40:19 -04:00
ALSA: mixart: 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-74-tiwai@suse.de
This commit is contained in:
@@ -970,7 +970,7 @@ static int snd_mixart_pcm_analog(struct snd_mixart *chip)
|
||||
|
||||
pcm->info_flags = 0;
|
||||
pcm->nonatomic = true;
|
||||
strcpy(pcm->name, name);
|
||||
strscpy(pcm->name, name);
|
||||
|
||||
preallocate_buffers(chip, pcm);
|
||||
|
||||
@@ -1004,7 +1004,7 @@ static int snd_mixart_pcm_digital(struct snd_mixart *chip)
|
||||
|
||||
pcm->info_flags = 0;
|
||||
pcm->nonatomic = true;
|
||||
strcpy(pcm->name, name);
|
||||
strscpy(pcm->name, name);
|
||||
|
||||
preallocate_buffers(chip, pcm);
|
||||
|
||||
@@ -1330,7 +1330,7 @@ static int snd_mixart_probe(struct pci_dev *pci,
|
||||
return err;
|
||||
}
|
||||
|
||||
strcpy(card->driver, CARD_NAME);
|
||||
strscpy(card->driver, CARD_NAME);
|
||||
snprintf(card->shortname, sizeof(card->shortname),
|
||||
"Digigram miXart [PCM #%d]", i);
|
||||
snprintf(card->longname, sizeof(card->longname),
|
||||
|
||||
Reference in New Issue
Block a user