summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/fuse/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 8ef8134e1cd5..70f364aa6541 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -699,7 +699,7 @@ static int get_security_context(struct dentry *entry, umode_t mode,
fctx->size = lsmctx.len;
ptr += sizeof(*fctx);
- strcpy(ptr, name);
+ strscpy(ptr, name, namelen);
ptr += namelen;
memcpy(ptr, lsmctx.context, lsmctx.len);