You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
829 B
30 lines
829 B
10 years ago
|
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
|
||
|
|
||
|
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)
|