projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d04e282
)
virtio-9p: Check the return value of llistxattr.
author
Kusanagi Kouichi
<slash@ac.auone-net.jp>
Sat, 30 Oct 2010 02:52:39 +0000
(11:52 +0900)
committer
Venkateswararao Jujjuri (JV)
<jvrao@linux.vnet.ibm.com>
Fri, 3 Dec 2010 00:08:27 +0000
(16:08 -0800)
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>
hw/virtio-9p-xattr.c
patch
|
blob
|
history
diff --git
a/hw/virtio-9p-xattr.c
b/hw/virtio-9p-xattr.c
index 175f372c39560ae191d0850adce4bcf41568bde0..1aab081de2ab7ce2883ed6250a668f7382e7f66d 100644
(file)
--- a/
hw/virtio-9p-xattr.c
+++ b/
hw/virtio-9p-xattr.c
@@
-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);