]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: es18xx: Use safer strscpy() instead of strcpy()
authorTakashi Iwai <tiwai@suse.de>
Thu, 10 Jul 2025 10:06:11 +0000 (12:06 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 11 Jul 2025 07:53:14 +0000 (09:53 +0200)
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>
Link: https://patch.msgid.link/20250710100727.22653-30-tiwai@suse.de
sound/isa/es18xx.c

index e35c727a52fa2102953f15738f34b0771814a429..3e89a84c62447ca66648122b08198469f8d12f18 100644 (file)
@@ -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;