Skip to contentSkip to conversation

ALSA: timer: Replace deprecated strcpy() with strscpy()

PATCH In review Thorsten Blum 2 participants 2 messages Jun 30, 2025 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: timer: Replace deprecated strcpy() with strscpy()

strcpy() is deprecated; use strscpy() instead.

No functional changes intended.

---
 sound/core/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/timer.c +1 -1
index 1de4b90fd4d1..776c48a420c6 100644
@@ -1195,7 +1195,7 @@ static int snd_timer_register_system(void)
 	err = snd_timer_global_new("system", SNDRV_TIMER_GLOBAL_SYSTEM, &timer);
 	if (err < 0)
 		return err;
-	strcpy(timer->name, "system timer");
+	strscpy(timer->name, "system timer");
 	timer->hw = snd_timer_system;
 	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
 	if (priv == NULL) {
Signature · 1 line
2.49.0