From: Shannon Zhao <zhaoshengl...@huawei.com>

It's detected by coverity. Fix out-of-bounds access of the function 
mp_dacl_listxattr.

Signed-off-by: Shannon Zhao <zhaoshengl...@huawei.com>
Signed-off-by: Shannon Zhao <shannon.z...@linaro.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com>
---
 hw/9pfs/virtio-9p-posix-acl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/9pfs/virtio-9p-posix-acl.c b/hw/9pfs/virtio-9p-posix-acl.c
index 803d9d94f3b8..09dad071e487 100644
--- a/hw/9pfs/virtio-9p-posix-acl.c
+++ b/hw/9pfs/virtio-9p-posix-acl.c
@@ -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;
 }
 
-- 
2.1.0


Reply via email to