initramfs: Replace strcpy() with strscpy() in find_link()

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

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Thorsten Blum 2025-09-12 08:47:24 +02:00 committed by Christian Brauner
parent beb022ef92
commit afd77d2050
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,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;