]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix crash on NULL uri scheme
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 20 Nov 2008 14:33:59 +0000 (14:33 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 20 Nov 2008 14:33:59 +0000 (14:33 +0000)
ChangeLog
src/remote_internal.c

index 71a511ec7af72bb2e534681c55cc9f558c8155aa..295675fb8c1e5937cbbcd622bfaf04d9bb988a6e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Nov 20 14:31:00 GMT 2008 Daniel Berrange <berrange@redhat.com>
+
+       * src/remote_internal.c: Avoid crash on NULL URI scheme
+
 Wed Nov 19 16:51:00 GMT 2008 Daniel Berrange <berrange@redhat.com>
 
        Add User Mode Linux driver
index 7ca6ec10c98d8882c072405fabb51f3e890a4b75..21f716d3db443a686549d3b30033b6f0c374583b 100644 (file)
@@ -855,6 +855,7 @@ remoteOpen (virConnectPtr conn,
      */
     if (conn->uri &&
         !conn->uri->server &&
+        conn->uri->scheme &&
         !strchr(conn->uri->scheme, '+')) {
         DEBUG0("Auto-remote UNIX socket");
         rflags |= VIR_DRV_OPEN_REMOTE_UNIX;
@@ -869,6 +870,7 @@ remoteOpen (virConnectPtr conn,
     if (conn->uri &&
         !conn->uri->server &&
         conn->uri->path &&
+        conn->uri->scheme &&
         ((strchr(conn->uri->scheme, '+') == 0)||
          (strstr(conn->uri->scheme, "+unix") != NULL)) &&
         STREQ(conn->uri->path, "/session") &&