mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
ALSA: firewire: fireface: 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> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://patch.msgid.link/20250710100727.22653-17-tiwai@suse.de
This commit is contained in:
parent
662dacfc64
commit
4b366c9d78
2 changed files with 4 additions and 4 deletions
|
@ -197,7 +197,7 @@ int snd_ff_create_hwdep_devices(struct snd_ff *ff)
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
strcpy(hwdep->name, ff->card->driver);
|
strscpy(hwdep->name, ff->card->driver);
|
||||||
hwdep->iface = SNDRV_HWDEP_IFACE_FW_FIREFACE;
|
hwdep->iface = SNDRV_HWDEP_IFACE_FW_FIREFACE;
|
||||||
hwdep->ops = hwdep_ops;
|
hwdep->ops = hwdep_ops;
|
||||||
hwdep->private_data = ff;
|
hwdep->private_data = ff;
|
||||||
|
|
|
@ -27,9 +27,9 @@ static void name_card(struct snd_ff *ff)
|
||||||
|
|
||||||
name = names[ff->unit_version];
|
name = names[ff->unit_version];
|
||||||
|
|
||||||
strcpy(ff->card->driver, "Fireface");
|
strscpy(ff->card->driver, "Fireface");
|
||||||
strcpy(ff->card->shortname, name);
|
strscpy(ff->card->shortname, name);
|
||||||
strcpy(ff->card->mixername, name);
|
strscpy(ff->card->mixername, name);
|
||||||
snprintf(ff->card->longname, sizeof(ff->card->longname),
|
snprintf(ff->card->longname, sizeof(ff->card->longname),
|
||||||
"RME %s, GUID %08x%08x at %s, S%d", name,
|
"RME %s, GUID %08x%08x at %s, S%d", name,
|
||||||
fw_dev->config_rom[3], fw_dev->config_rom[4],
|
fw_dev->config_rom[3], fw_dev->config_rom[4],
|
||||||
|
|
Loading…
Add table
Reference in a new issue