提交 c11a82b6 编写于 作者: R Richard Jones

qemu driver: Fix segfault in libvirt/libvirtd when uri->path is NULL.

See also:
https://bugzilla.redhat.com/show_bug.cgi?id=545400#c1
上级 51ea18a8
......@@ -2651,6 +2651,15 @@ static virDrvOpenStatus qemudOpen(virConnectPtr conn,
return VIR_DRV_OPEN_ERROR;
}
if (conn->uri->path == NULL) {
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
_("no QEMU URI path given, try %s"),
qemu_driver->privileged
? "qemu:///system"
: "qemu:///session");
return VIR_DRV_OPEN_ERROR;
}
if (qemu_driver->privileged) {
if (STRNEQ (conn->uri->path, "/system") &&
STRNEQ (conn->uri->path, "/session")) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册