summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2008-03-04 14:17:20 +0000
committerAlexander Larsson <alexl@src.gnome.org>2008-03-04 14:17:20 +0000
commit81475a90805f633adff0f335cb9dd3a638c9c5a1 (patch)
tree77bd302a56b9ee58c02845615dad6f3fe20cb76a
parent95bf9c298654348a1ff7deea1a8af92c93cc2f5b (diff)
downloadgvfs-81475a90805f633adff0f335cb9dd3a638c9c5a1.tar.gz
Fix crash with NULL host (like "ftp://")
2008-03-04 Alexander Larsson <alexl@redhat.com> * client/gdaemonvfs.c: (_g_daemon_vfs_get_uri_for_mountspec): Fix crash with NULL host (like "ftp://") svn path=/trunk/; revision=1529
-rw-r--r--ChangeLog6
-rw-r--r--client/gdaemonvfs.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b20ae9ef..0af11c9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2008-03-04 Alexander Larsson <alexl@redhat.com>
+ * client/gdaemonvfs.c:
+ (_g_daemon_vfs_get_uri_for_mountspec):
+ Fix crash with NULL host (like "ftp://")
+
+2008-03-04 Alexander Larsson <alexl@redhat.com>
+
* client/gdaemonmount.c (g_daemon_mount_get_icon):
Use fallbacks for mount icon.
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c
index 6e70a41e..ec00ad8a 100644
--- a/client/gdaemonvfs.c
+++ b/client/gdaemonvfs.c
@@ -466,7 +466,7 @@ _g_daemon_vfs_get_uri_for_mountspec (GMountSpec *spec,
decoded.scheme = (char *)type;
decoded.host = (char *)g_mount_spec_get (spec, "host");
free_host = FALSE;
- if (mountable && mountable->host_is_inet && strchr (decoded.host, ':') != NULL)
+ if (mountable && mountable->host_is_inet && decoded.host != NULL && strchr (decoded.host, ':') != NULL)
{
free_host = TRUE;
decoded.host = g_strconcat ("[", decoded.host, "]", NULL);