All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] initramfs: Replace strcpy() with strscpy() in find_link()
@ 2025-09-12  6:47 Thorsten Blum
  2025-09-12 18:05 ` Justin Stitt
  2025-09-15 12:52 ` Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Blum @ 2025-09-12  6:47 UTC (permalink / raw)
  To: Alexander Viro, Christian Brauner, Jan Kara
  Cc: linux-hardening, Thorsten Blum, linux-fsdevel, linux-kernel

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

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 init/initramfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/initramfs.c b/init/initramfs.c
index 097673b97784..6745e3fbc7ab 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -108,7 +108,7 @@ static char __init *find_link(int major, int minor, int ino,
 	q->minor = minor;
 	q->ino = ino;
 	q->mode = mode;
-	strcpy(q->name, name);
+	strscpy(q->name, name);
 	q->next = NULL;
 	*p = q;
 	hardlink_seen = true;
-- 
2.51.0


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

end of thread, other threads:[~2025-09-15 12:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-12  6:47 [PATCH] initramfs: Replace strcpy() with strscpy() in find_link() Thorsten Blum
2025-09-12 18:05 ` Justin Stitt
2025-09-15 12:52 ` Christian Brauner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.