ALSA: lola: 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-71-tiwai@suse.de
This commit is contained in:
Takashi Iwai
2025-07-10 12:06:52 +02:00
parent 22b331f5a2
commit cc519d221f

View File

@@ -630,12 +630,12 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci, int dev)
if (err < 0)
return err;
strcpy(card->driver, "Lola");
strscpy(card->driver, "Lola");
strscpy(card->shortname, "Digigram Lola", sizeof(card->shortname));
snprintf(card->longname, sizeof(card->longname),
"%s at 0x%lx irq %i",
card->shortname, chip->bar[0].addr, chip->irq);
strcpy(card->mixername, card->shortname);
strscpy(card->mixername, card->shortname);
lola_irq_enable(chip);