提交 2969eff8 编写于 作者: M Matthias Bolte

xenapi: Check for NULL before accessing the scheme

上级 2ed0b3f9
...@@ -88,7 +88,8 @@ xenapiOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUS ...@@ -88,7 +88,8 @@ xenapiOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUS
char *password = NULL; char *password = NULL;
struct _xenapiPrivate *privP = NULL; struct _xenapiPrivate *privP = NULL;
if (STRCASENEQ(conn->uri->scheme, "XenAPI")) { if (conn->uri == NULL || conn->uri->scheme == NULL ||
STRCASENEQ(conn->uri->scheme, "XenAPI")) {
return VIR_DRV_OPEN_DECLINED; return VIR_DRV_OPEN_DECLINED;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册