diff options
author | Bastien Nocera <hadess@hadess.net> | 2015-05-12 21:58:09 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2015-06-16 13:57:27 +0200 |
commit | 7deded463b8cc148103c55460a84a6b23342c941 (patch) | |
tree | 0b234ce0f534abc462e1bac10fcd42410792ae04 /common | |
parent | 9de6328f97a75b3ac4431810b33605f75778f1f2 (diff) | |
download | gvfs-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.c | 8 |
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); |