Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ALSA: mixer_oss: Replace deprecated strcpy() with strscpy()
@ 2025-06-18 22:36 Thorsten Blum
  2025-06-18 22:49 ` Al Viro
  0 siblings, 1 reply; 5+ messages in thread
From: Thorsten Blum @ 2025-06-18 22:36 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Al Viro, Christophe JAILLET
  Cc: Thorsten Blum, Takashi Iwai, linux-sound, linux-kernel

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@linux.dev>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-06-23 11:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18 22:36 [PATCH] ALSA: mixer_oss: Replace deprecated strcpy() with strscpy() Thorsten Blum
2025-06-18 22:49 ` Al Viro
2025-06-19 12:50   ` Thorsten Blum
2025-06-20  8:08     ` Takashi Iwai
2025-06-23 11:05       ` Thorsten Blum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox