From 9005c3b3efb7eb1b140d2ad0385efff6a3af59c4 Mon Sep 17 00:00:00 2001 From: Shannon Zhao Date: Fri, 13 Mar 2015 13:48:07 +0800 Subject: 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 Signed-off-by: Shannon Zhao Signed-off-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p-posix-acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw') diff --git a/hw/9pfs/virtio-9p-posix-acl.c b/hw/9pfs/virtio-9p-posix-acl.c index 803d9d9..09dad07 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; } -- cgit v1.1