mirror of https://github.com/torvalds/linux.git
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:
parent
94d7b8beae
commit
461cef4d7d
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue