mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
virtio-9p: Check the return value of llistxattr.
If llistxattr returned 0, qemu aborts. Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
This commit is contained in:
parent
d04e2826f5
commit
0562c67432
1 changed files with 3 additions and 0 deletions
|
@ -73,6 +73,9 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
|
|||
|
||||
/* Get the actual len */
|
||||
xattr_len = llistxattr(rpath(ctx, path), value, 0);
|
||||
if (xattr_len <= 0) {
|
||||
return xattr_len;
|
||||
}
|
||||
|
||||
/* Now fetch the xattr and find the actual size */
|
||||
orig_value = qemu_malloc(xattr_len);
|
||||
|
|
Loading…
Reference in a new issue