[PATCH] sched/debug: Replace deprecated strcpy() with strscpy()
From: Thorsten Blum
Date: Wed Aug 13 2025 - 06:26:06 EST
strcpy() is deprecated; use strscpy() instead.
Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
---
kernel/sched/debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 3f06ab84d53f..bf76980e2334 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -719,7 +719,7 @@ static void task_group_path(struct task_group *tg, char *path, int plen)
char buf[128]; \
char *bufend = buf + sizeof(buf) - 3; \
task_group_path(tg, buf, bufend - buf); \
- strcpy(bufend - 1, "..."); \
+ strscpy(bufend - 1, "...", 4); \
SEQ_printf(m, fmt, buf); \
} \
}
--
2.50.1