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
@ -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 New Issue
Block a user