[gnome-commander] Added security check for mime_exec_file



commit 5b0b3a469ab426feb596b0edfcc61cde4c0e6e80
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sat Mar 7 00:26:04 2015 +0100

    Added security check for mime_exec_file

 src/gnome-cmd-file-list.cc |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index 0312a85..d46ed16 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -1172,14 +1172,15 @@ static gboolean on_button_press (GtkCList *clist, GdkEventButton *event, GnomeCm
 
 inline gboolean mime_exec_file (GnomeCmdFile *f)
 {
+    g_return_val_if_fail (f != NULL, FALSE);
+
     if (f->info->type == GNOME_VFS_FILE_TYPE_REGULAR)
     {
         mime_exec_single (f);
-        return TRUE;
     }
 
-    return FALSE;
-}
+    return TRUE;
+ }
 
 
 static void on_file_clicked (GnomeCmdFileList *fl, GnomeCmdFile *f, GdkEventButton *event, gpointer data)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]