summaryrefslogtreecommitdiffstats
path: root/qom
diff options
context:
space:
mode:
authorCole Robinson2014-04-10 20:47:38 +0200
committerPeter Maydell2014-04-11 18:57:36 +0200
commit92b3eeadd9bc72f1f4e5ba1f62a289dc0190e88f (patch)
tree2f431244a5e41f8466c11806855abbd2f84ef40c /qom
parentvirtio-net: fix guest-triggerable buffer overrun (diff)
downloadqemu-92b3eeadd9bc72f1f4e5ba1f62a289dc0190e88f.tar.gz
qemu-92b3eeadd9bc72f1f4e5ba1f62a289dc0190e88f.tar.xz
qemu-92b3eeadd9bc72f1f4e5ba1f62a289dc0190e88f.zip
qom: Fix crash with qom-list and link properties
Commit 9561fda8d90e176bef598ba87c42a1bd6ad03ef7 changed the type of 'opaque' for link properties, but missed updating this call site. Reproducer: ./x86_64-softmmu/qemu-system-x86_64 -qmp unix:./qmp.sock,server & ./scripts/qmp/qmp-shell ./qmp.sock (QEMU) qom-list path=//machine/i440fx/pci.0/child[2] Reported-by: Marcin Gibuła <m.gibula@beyond.pl> Signed-off-by: Cole Robinson <crobinso@redhat.com> Message-id: 2f8f007ce2152ac3b65f0811199662799c509225.1397155389.git.crobinso@redhat.com Acked-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qom')
-rw-r--r--qom/object.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/qom/object.c b/qom/object.c
index f4de619b7b..9a730e74c1 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1225,7 +1225,8 @@ Object *object_resolve_path_component(Object *parent, const gchar *part)
}
if (object_property_is_link(prop)) {
- return *(Object **)prop->opaque;
+ LinkProperty *lprop = prop->opaque;
+ return *lprop->child;
} else if (object_property_is_child(prop)) {
return prop->opaque;
} else {