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: digi00x: 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-16-tiwai@suse.de
This commit is contained in:
parent
ae2cdfc616
commit
662dacfc64
2 changed files with 4 additions and 4 deletions
|
@ -188,7 +188,7 @@ int snd_dg00x_create_hwdep_device(struct snd_dg00x *dg00x)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
strcpy(hwdep->name, "Digi00x");
|
||||
strscpy(hwdep->name, "Digi00x");
|
||||
hwdep->iface = SNDRV_HWDEP_IFACE_FW_DIGI00X;
|
||||
hwdep->ops = ops;
|
||||
hwdep->private_data = dg00x;
|
||||
|
|
|
@ -30,9 +30,9 @@ static int name_card(struct snd_dg00x *dg00x)
|
|||
|
||||
model = skip_spaces(name);
|
||||
|
||||
strcpy(dg00x->card->driver, "Digi00x");
|
||||
strcpy(dg00x->card->shortname, model);
|
||||
strcpy(dg00x->card->mixername, model);
|
||||
strscpy(dg00x->card->driver, "Digi00x");
|
||||
strscpy(dg00x->card->shortname, model);
|
||||
strscpy(dg00x->card->mixername, model);
|
||||
snprintf(dg00x->card->longname, sizeof(dg00x->card->longname),
|
||||
"Digidesign %s, GUID %08x%08x at %s, S%d", model,
|
||||
fw_dev->config_rom[3], fw_dev->config_rom[4],
|
||||
|
|
Loading…
Add table
Reference in a new issue