Commit 2173cee1 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: synth: 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: default avatarTakashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250710100727.22653-95-tiwai@suse.de
parent 3fb167d7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ snd_emux_init_hwdep(struct snd_emux *emu)
	if (err < 0)
		return err;
	emu->hwdep = hw;
	strcpy(hw->name, SNDRV_EMUX_HWDEP_NAME);
	strscpy(hw->name, SNDRV_EMUX_HWDEP_NAME);
	hw->iface = SNDRV_HWDEP_IFACE_EMUX_WAVETABLE;
	hw->ops.ioctl = snd_emux_hwdep_ioctl;
	/* The ioctl parameter types are compatible between 32- and
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ snd_emux_init_seq_oss(struct snd_emux *emu)
		return;

	emu->oss_synth = dev;
	strcpy(dev->name, emu->name);
	strscpy(dev->name, emu->name);
	arg = SNDRV_SEQ_DEVICE_ARGPTR(dev);
	arg->type = SYNTH_TYPE_SAMPLE;
	arg->subtype = SAMPLE_TYPE_AWE32;