Commit 9005c3b3 authored by Shannon Zhao's avatar Shannon Zhao Committed by Aneesh Kumar K.V
Browse files

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: default avatarShannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: default avatarShannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
parent 7752efca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}