Skip to content

Commit

Permalink
hw/9pfs/virtio-9p-posix-acl: Fix out-of-bounds access
Browse files Browse the repository at this point in the history
It's detected by coverity. Fix out-of-bounds access of the function mp_dacl_listxattr.

Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
  • Loading branch information
Shannon Zhao authored and kvaneesh committed Mar 13, 2015
1 parent 7752efc commit 9005c3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/9pfs/virtio-9p-posix-acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static ssize_t mp_dacl_listxattr(FsContext *ctx, const char *path,
}

/* len includes the trailing NUL */
memcpy(value, ACL_ACCESS, len);
memcpy(value, ACL_DEFAULT, len);
return 0;
}

Expand Down

0 comments on commit 9005c3b

Please sign in to comment.