summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2015-05-12 21:58:09 +0200
committerOndrej Holy <oholy@redhat.com>2015-06-16 13:57:27 +0200
commit7deded463b8cc148103c55460a84a6b23342c941 (patch)
tree0b234ce0f534abc462e1bac10fcd42410792ae04 /common
parent9de6328f97a75b3ac4431810b33605f75778f1f2 (diff)
downloadgvfs-7deded463b8cc148103c55460a84a6b23342c941.tar.gz
common: Fix possible crash with blank disks
Never call bd_open() with an empty path. https://bugzilla.gnome.org/show_bug.cgi?id=749093
Diffstat (limited to 'common')
-rw-r--r--common/gvfsmountinfo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/gvfsmountinfo.c b/common/gvfsmountinfo.c
index d206b918..2c365516 100644
--- a/common/gvfsmountinfo.c
+++ b/common/gvfsmountinfo.c
@@ -485,6 +485,14 @@ bdmv_metadata_thread (GSimpleAsyncResult *result,
file = G_FILE (object);
disc_root = g_file_get_path (file);
+ if (!disc_root)
+ {
+ error = g_error_new_literal (G_IO_ERROR,
+ G_IO_ERROR_FAILED,
+ "Device is not a Blu-Ray disc");
+ goto error;
+ }
+
bd = bd_open (disc_root, NULL);
g_free (disc_root);