git: 612e060c036f - releng/11.4 - ffs: avoid creating corrupt extattrfile
Ed Maste
emaste at FreeBSD.org
Fri Jan 29 00:18:48 UTC 2021
The branch releng/11.4 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=612e060c036f9328e6c19a3525d33d1d33006e04
commit 612e060c036f9328e6c19a3525d33d1d33006e04
Author: Ed Maste <emaste at FreeBSD.org>
AuthorDate: 2021-01-18 16:58:38 +0000
Commit: Ed Maste <emaste at FreeBSD.org>
CommitDate: 2021-01-29 00:06:55 +0000
ffs: avoid creating corrupt extattrfile
This is part of r312416 / e6790841f749, suggested by ml at netfence.it,
and will stop the kernel from creating corrupt extattr.
PR: 244089
(cherry picked from commit eebccaae36722f62bc8f05e6c71b867d69faca5f)
Approved by: so
---
sys/ufs/ffs/ffs_vnops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 1cbd36de452b..586ff0cb3b7b 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -1663,7 +1663,7 @@ vop_setextattr {
*p++ = ap->a_attrnamespace;
*p++ = eapad2;
*p++ = strlen(ap->a_name);
- strcpy(p, ap->a_name);
+ memcpy(p, ap->a_name, strlen(ap->a_name));
p += strlen(ap->a_name);
bzero(p, eapad1);
p += eapad1;
More information about the dev-commits-src-all
mailing list