[PATCH] ALSA: mixer_oss: Replace deprecated strcpy() with strscpy()
From: Thorsten Blum
Date: Wed Jun 18 2025 - 18:37:36 EST
strcpy() is deprecated; use strscpy() instead.
No functional changes intended.
Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
---
sound/core/oss/mixer_oss.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index 05fc8911479c..d3d993da3269 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -1014,11 +1014,11 @@ static int snd_mixer_oss_build_input(struct snd_mixer_oss *mixer,
if (kctl->info(kctl, uinfo))
return 0;
- strcpy(str, ptr->name);
+ strscpy(str, ptr->name);
if (!strcmp(str, "Master"))
- strcpy(str, "Mix");
+ strscpy(str, "Mix");
if (!strcmp(str, "Master Mono"))
- strcpy(str, "Mix Mono");
+ strscpy(str, "Mix Mono");
slot.capture_item = 0;
if (!strcmp(uinfo->value.enumerated.name, str)) {
slot.present |= SNDRV_MIXER_OSS_PRESENT_CAPTURE;
--
2.49.0