From: Takashi Iwai Date: Thu, 10 Jul 2025 10:06:25 +0000 (+0200) Subject: ALSA: ak4531: Use safer strscpy() instead of strcpy() X-Git-Tag: block-6.17-20250808~24^2~98 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=1d68ba24a79c2dce7cdb4bfbc6fdd8e0b2e69b85;p=linux-block.git ALSA: ak4531: 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-44-tiwai@suse.de --- diff --git a/sound/pci/ak4531_codec.c b/sound/pci/ak4531_codec.c index 6af88e7b86f8..e54812bfb2c6 100644 --- a/sound/pci/ak4531_codec.c +++ b/sound/pci/ak4531_codec.c @@ -389,7 +389,7 @@ int snd_ak4531_mixer(struct snd_card *card, snd_ak4531_free(ak4531); return err; } - strcpy(card->mixername, "Asahi Kasei AK4531"); + strscpy(card->mixername, "Asahi Kasei AK4531"); ak4531->write(ak4531, AK4531_RESET, 0x03); /* no RST, PD */ udelay(100); ak4531->write(ak4531, AK4531_CLOCK, 0x00); /* CODEC ADC and CODEC DAC use {LR,B}CLK2 and run off LRCLK2 PLL */