[PATCH] ALSA: timer: Replace deprecated strcpy() with strscpy()

Thorsten Blum posted 1 patch 3 months, 1 week ago
sound/core/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] ALSA: timer: Replace deprecated strcpy() with strscpy()
Posted by Thorsten Blum 3 months, 1 week ago
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/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/core/timer.c b/sound/core/timer.c
index 1de4b90fd4d1..776c48a420c6 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -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) {
-- 
2.49.0
Re: [PATCH] ALSA: timer: Replace deprecated strcpy() with strscpy()
Posted by Takashi Iwai 3 months, 1 week ago
On Mon, 30 Jun 2025 12:54:18 +0200,
Thorsten Blum wrote:
> 
> 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>

Applied now.  Thanks.


Takashi