hw/9pfs/virtio-9p-posix-acl: Fix out-of-bounds access

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>
This commit is contained in:
Shannon Zhao 2015-03-13 13:48:07 +08:00 committed by Aneesh Kumar K.V
parent 7752efcacf
commit 9005c3b3ef
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ static ssize_t mp_dacl_listxattr(FsContext *ctx, const char *path,
} }
/* len includes the trailing NUL */ /* len includes the trailing NUL */
memcpy(value, ACL_ACCESS, len); memcpy(value, ACL_DEFAULT, len);
return 0; return 0;
} }