mm-memfd-replace-deprecated-strcpy-with-memcpy-in-alloc_name.patch removed from -mm tree
The quilt patch titled
Subject: mm/memfd: replace deprecated strcpy() with memcpy() in alloc_name()
has been removed from the -mm tree. Its filename was
mm-memfd-replace-deprecated-strcpy-with-memcpy-in-alloc_name.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Thorsten Blum <[email protected]>
Subject: mm/memfd: replace deprecated strcpy() with memcpy() in alloc_name()
Date: Sat, 12 Jul 2025 19:45:17 +0200
strcpy() is deprecated; use memcpy() instead.
Not copying the NUL terminator is safe because strncpy_from_user() would overwrite it anyway by appending uname to the destination buffer at index MFD_NAME_PREFIX_LEN.
No functional changes intended.
---
mm/memfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memfd.c renamed from mm/memfd.c~mm-memfd-replace-deprecated-strcpy-with-memcpy-in-alloc_name +1 -1
@@ -411,7 +411,7 @@ static char *alloc_name(const char __useif (!name)return ERR_PTR (-ENOMEM ); -strcpy (name,MFD_NAME_PREFIX ); +memcpy (name,MFD_NAME_PREFIX ,MFD_NAME_PREFIX_LEN );/* returned length does not include terminating zero */ len =strncpy_from_user (&name[MFD_NAME_PREFIX_LEN ], uname,MFD_NAME_MAX_LEN +1 );if (len <0 ) {
_
Patches currently in -mm which might be from [email protected] are