ALSA: adlib: 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-24-tiwai@suse.de
This commit is contained in:
Takashi Iwai 2025-07-10 12:06:05 +02:00
parent 94d7b8beae
commit 461cef4d7d
1 changed files with 2 additions and 2 deletions

View File

@ -61,8 +61,8 @@ static int snd_adlib_probe(struct device *dev, unsigned int n)
return -EBUSY;
}
strcpy(card->driver, DEV_NAME);
strcpy(card->shortname, CRD_NAME);
strscpy(card->driver, DEV_NAME);
strscpy(card->shortname, CRD_NAME);
sprintf(card->longname, CRD_NAME " at %#lx", port[n]);
error = snd_opl3_create(card, port[n], port[n] + 2, OPL3_HW_AUTO, 1, &opl3);