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: bebob: 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-14-tiwai@suse.de
This commit is contained in:
parent
c4a38b94ba
commit
f9f63cb6eb
2 changed files with 4 additions and 4 deletions
|
@ -105,9 +105,9 @@ name_device(struct snd_bebob *bebob)
|
|||
if (err < 0)
|
||||
goto end;
|
||||
|
||||
strcpy(bebob->card->driver, "BeBoB");
|
||||
strcpy(bebob->card->shortname, model);
|
||||
strcpy(bebob->card->mixername, model);
|
||||
strscpy(bebob->card->driver, "BeBoB");
|
||||
strscpy(bebob->card->shortname, model);
|
||||
strscpy(bebob->card->mixername, model);
|
||||
snprintf(bebob->card->longname, sizeof(bebob->card->longname),
|
||||
"%s %s (id:%d, rev:%d), GUID %08x%08x at %s, S%d",
|
||||
vendor, model, hw_id, revision,
|
||||
|
|
|
@ -183,7 +183,7 @@ int snd_bebob_create_hwdep_device(struct snd_bebob *bebob)
|
|||
err = snd_hwdep_new(bebob->card, "BeBoB", 0, &hwdep);
|
||||
if (err < 0)
|
||||
goto end;
|
||||
strcpy(hwdep->name, "BeBoB");
|
||||
strscpy(hwdep->name, "BeBoB");
|
||||
hwdep->iface = SNDRV_HWDEP_IFACE_FW_BEBOB;
|
||||
hwdep->ops = ops;
|
||||
hwdep->private_data = bebob;
|
||||
|
|
Loading…
Add table
Reference in a new issue