Fix reading of setxattr name

This commit is contained in:
Antonio SJ Musumeci 2022-12-06 23:26:08 -05:00
parent ac1f4b4d52
commit d14427ad9e
3 changed files with 10 additions and 1 deletions

View file

@ -2788,7 +2788,11 @@ fuse_lib_setxattr(fuse_req_t req,
struct fuse_setxattr_in *arg;
arg = fuse_hdr_arg(hdr_);
name = PARAM(arg);
if((req->f->conn.capable & FUSE_SETXATTR_EXT) && (req->f->conn.want & FUSE_SETXATTR_EXT))
name = PARAM(arg);
else
name = (((char*)arg) + FUSE_COMPAT_SETXATTR_IN_SIZE);
value = (name + strlen(name) + 1);
f = req_fuse_prepare(req);