From: Takashi Iwai Date: Thu, 10 Jul 2025 10:06:11 +0000 (+0200) Subject: ALSA: es18xx: Use safer strscpy() instead of strcpy() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=962dba349a76dd6872371c793f074704e57d2dc9;p=users%2Fjedix%2Flinux-maple.git ALSA: es18xx: 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 Link: https://patch.msgid.link/20250710100727.22653-30-tiwai@suse.de --- diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index e35c727a52fa..3e89a84c6244 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c @@ -1771,7 +1771,7 @@ static int snd_es18xx_mixer(struct snd_card *card) int err; unsigned int idx; - strcpy(card->mixername, chip->pcm->name); + strscpy(card->mixername, chip->pcm->name); for (idx = 0; idx < ARRAY_SIZE(snd_es18xx_base_controls); idx++) { struct snd_kcontrol *kctl;