mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 20:46:48 +02:00
ALSA: ad1889: 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-43-tiwai@suse.de
This commit is contained in:
parent
c9b7c4b628
commit
48102e3220
|
|
@ -605,7 +605,7 @@ snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device)
|
|||
|
||||
pcm->private_data = chip;
|
||||
pcm->info_flags = 0;
|
||||
strcpy(pcm->name, chip->card->shortname);
|
||||
strscpy(pcm->name, chip->card->shortname);
|
||||
|
||||
chip->pcm = pcm;
|
||||
chip->psubs = NULL;
|
||||
|
|
@ -866,8 +866,8 @@ __snd_ad1889_probe(struct pci_dev *pci,
|
|||
return err;
|
||||
chip = card->private_data;
|
||||
|
||||
strcpy(card->driver, "AD1889");
|
||||
strcpy(card->shortname, "Analog Devices AD1889");
|
||||
strscpy(card->driver, "AD1889");
|
||||
strscpy(card->shortname, "Analog Devices AD1889");
|
||||
|
||||
/* (3) */
|
||||
err = snd_ad1889_create(card, pci);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user