[gvfs] common: Fix possible crash with blank disks
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] common: Fix possible crash with blank disks
- Date: Tue, 16 Jun 2015 11:59:41 +0000 (UTC)
commit 7deded463b8cc148103c55460a84a6b23342c941
Author: Bastien Nocera <hadess hadess net>
Date: Tue May 12 21:58:09 2015 +0200
common: Fix possible crash with blank disks
Never call bd_open() with an empty path.
https://bugzilla.gnome.org/show_bug.cgi?id=749093
common/gvfsmountinfo.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/common/gvfsmountinfo.c b/common/gvfsmountinfo.c
index d206b91..2c36551 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]