ALSA: sscape: 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-37-tiwai@suse.de
This commit is contained in:
Takashi Iwai 2025-07-10 12:06:18 +02:00
parent c8eef317e6
commit 96b1776d01
1 changed files with 2 additions and 2 deletions

View File

@ -1047,8 +1047,8 @@ static int create_sscape(int dev, struct snd_card *card)
wss_port[dev], irq[dev]);
return err;
}
strcpy(card->driver, "SoundScape");
strcpy(card->shortname, name);
strscpy(card->driver, "SoundScape");
strscpy(card->shortname, name);
snprintf(card->longname, sizeof(card->longname),
"%s at 0x%lx, IRQ %d, DMA1 %d, DMA2 %d\n",
name, sscape->chip->port, sscape->chip->irq,