mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 09:33:31 +02:00
ALSA: pcxhr: 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-77-tiwai@suse.de
This commit is contained in:
parent
1c8e3ebdfe
commit
c810473253
|
|
@ -1149,7 +1149,7 @@ int pcxhr_create_pcm(struct snd_pcxhr *chip)
|
|||
|
||||
pcm->info_flags = 0;
|
||||
pcm->nonatomic = true;
|
||||
strcpy(pcm->name, name);
|
||||
strscpy(pcm->name, name);
|
||||
|
||||
snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
|
||||
&chip->mgr->pci->dev,
|
||||
|
|
@ -1605,7 +1605,7 @@ static int pcxhr_probe(struct pci_dev *pci,
|
|||
return err;
|
||||
}
|
||||
|
||||
strcpy(card->driver, DRIVER_NAME);
|
||||
strscpy(card->driver, DRIVER_NAME);
|
||||
snprintf(card->shortname, sizeof(card->shortname),
|
||||
"Digigram [PCM #%d]", i);
|
||||
snprintf(card->longname, sizeof(card->longname),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user