diff options
| author | Takashi Iwai <tiwai@suse.de> | 2025-07-10 12:05:57 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-07-11 09:52:34 +0200 |
| commit | 662dacfc6466e9eb07ae6be18799b62dbdaa2a0a (patch) | |
| tree | 6c7d7e8bc4bfe7f3479acaee6b26f0595e60c16f /sound/firewire | |
| parent | ae2cdfc616722533332db129dbec385e32f467e0 (diff) | |
| download | linux-662dacfc6466e9eb07ae6be18799b62dbdaa2a0a.tar.gz linux-662dacfc6466e9eb07ae6be18799b62dbdaa2a0a.tar.bz2 linux-662dacfc6466e9eb07ae6be18799b62dbdaa2a0a.zip | |
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
Diffstat (limited to 'sound/firewire')
| -rw-r--r-- | sound/firewire/digi00x/digi00x-hwdep.c | 2 | ||||
| -rw-r--r-- | sound/firewire/digi00x/digi00x.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sound/firewire/digi00x/digi00x-hwdep.c b/sound/firewire/digi00x/digi00x-hwdep.c index aadf7d724856..b150607c0a0d 100644 --- a/sound/firewire/digi00x/digi00x-hwdep.c +++ b/sound/firewire/digi00x/digi00x-hwdep.c @@ -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; diff --git a/sound/firewire/digi00x/digi00x.c b/sound/firewire/digi00x/digi00x.c index 704ae2a5316b..cebc35dcf8cd 100644 --- a/sound/firewire/digi00x/digi00x.c +++ b/sound/firewire/digi00x/digi00x.c @@ -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], |
