Skip to contentSkip to conversation

sched/debug: Replace deprecated strcpy() with strscpy()

PATCH RESEND Superseded Thorsten Blum 1 participant 1 message Aug 29, 2025 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 sched/debug: Replace deprecated strcpy() with strscpy()

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

---
 kernel/sched/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/debug.c +1 -1
index 3f06ab84d53f..bf76980e2334 100644
@@ -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);				\
 	}								\
 }
Signature · 1 line
2.51.0