orangefs_inode_getxattr(): replace deprecated strcpy with strscpy
PATCH 1/1 orangefs_inode_getxattr(): replace deprecated strcpy with strscpy
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 <[email protected]>
--- fs/orangefs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/orangefs/xattr.c +1 -1
@@ -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
Signature · 1 line
2.39.5