The strcpy() function does not do bounds checking. strscpy() is the
recommended replacement to the deprecated function. The return value of
strcpy is not used so there shouldn't be issues here.
Signed-off-by: Daniel Yang <danielyangkang@gmail.com>
---
fs/orangefs/xattr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/orangefs/xattr.c b/fs/orangefs/xattr.c
index 74ef75586..d27ff38cf 100644
--- a/fs/orangefs/xattr.c
+++ b/fs/orangefs/xattr.c
@@ -150,7 +150,7 @@ ssize_t orangefs_inode_getxattr(struct inode *inode, const char *name,
goto out_unlock;
new_op->upcall.req.getxattr.refn = orangefs_inode->refn;
- strcpy(new_op->upcall.req.getxattr.key, name);
+ strscpy(new_op->upcall.req.getxattr.key, name);
/*
* NOTE: Although keys are meant to be NULL terminated textual
--
2.39.5