[nautilus/gnome-3-30] files-view: Fix use after free



commit 86a3bfc94e5aaf5a00302ab6ef68ad12f6144889
Author: Ernestas Kulik <ernestask gnome org>
Date:   Tue Oct 16 15:42:22 2018 +0000

    files-view: Fix use after free
    
    run_script() has a debug print, which references a freed string.
    
    Addresses https://gitlab.gnome.org/GNOME/nautilus/issues/628
    
    
    (cherry picked from commit 6e21a4d08fc51719f910cf993926e1b0531a648b)

 src/nautilus-files-view.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index efec3e662..1ee21bb24 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -5253,7 +5253,7 @@ run_script (GSimpleAction *action,
     GdkScreen *screen;
     g_autolist (NautilusFile) selection = NULL;
     char *file_uri;
-    char *local_file_path;
+    g_autofree char *local_file_path = NULL;
     char *quoted_path;
     char *old_working_dir;
     char **parameters;
@@ -5267,7 +5267,6 @@ run_script (GSimpleAction *action,
     g_free (file_uri);
 
     quoted_path = g_shell_quote (local_file_path);
-    g_free (local_file_path);
 
     old_working_dir = change_to_view_directory (launch_parameters->directory_view);
 


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