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: fireworks: 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-18-tiwai@suse.de
This commit is contained in:
parent
4b366c9d78
commit
fcd7979273
2 changed files with 4 additions and 4 deletions
|
@ -90,9 +90,9 @@ get_hardware_info(struct snd_efw *efw)
|
||||||
(hwinfo->arm_version >> 16) & 0xff);
|
(hwinfo->arm_version >> 16) & 0xff);
|
||||||
efw->firmware_version = hwinfo->arm_version;
|
efw->firmware_version = hwinfo->arm_version;
|
||||||
|
|
||||||
strcpy(efw->card->driver, "Fireworks");
|
strscpy(efw->card->driver, "Fireworks");
|
||||||
strcpy(efw->card->shortname, hwinfo->model_name);
|
strscpy(efw->card->shortname, hwinfo->model_name);
|
||||||
strcpy(efw->card->mixername, hwinfo->model_name);
|
strscpy(efw->card->mixername, hwinfo->model_name);
|
||||||
scnprintf(efw->card->longname, sizeof(efw->card->longname),
|
scnprintf(efw->card->longname, sizeof(efw->card->longname),
|
||||||
"%s %s v%s, GUID %08x%08x at %s, S%d",
|
"%s %s v%s, GUID %08x%08x at %s, S%d",
|
||||||
hwinfo->vendor_name, hwinfo->model_name, version,
|
hwinfo->vendor_name, hwinfo->model_name, version,
|
||||||
|
|
|
@ -319,7 +319,7 @@ int snd_efw_create_hwdep_device(struct snd_efw *efw)
|
||||||
err = snd_hwdep_new(efw->card, "Fireworks", 0, &hwdep);
|
err = snd_hwdep_new(efw->card, "Fireworks", 0, &hwdep);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto end;
|
goto end;
|
||||||
strcpy(hwdep->name, "Fireworks");
|
strscpy(hwdep->name, "Fireworks");
|
||||||
hwdep->iface = SNDRV_HWDEP_IFACE_FW_FIREWORKS;
|
hwdep->iface = SNDRV_HWDEP_IFACE_FW_FIREWORKS;
|
||||||
hwdep->ops = ops;
|
hwdep->ops = ops;
|
||||||
hwdep->private_data = efw;
|
hwdep->private_data = efw;
|
||||||
|
|
Loading…
Add table
Reference in a new issue