[Xfce4-commits] <thunar:master> Don't interpret file display names as format strings (bug #7128).

Jannis Pohlmann noreply at xfce.org
Mon Jan 24 20:08:01 CET 2011


Updating branch refs/heads/master
         to 1d4dfafda30df071d7c1e0b370f0613cbc92ba74 (commit)
       from bcdceffe0a292aa6ef24f149b746c9d5f15977be (commit)

commit 1d4dfafda30df071d7c1e0b370f0613cbc92ba74
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Mon Jan 24 20:06:35 2011 +0100

    Don't interpret file display names as format strings (bug #7128).
    
    This avoids a segmentation fault when creating files like '%s' or '%S'
    using File => Create Document => Empty File.

 NEWS                |    1 +
 thunar/thunar-job.c |   24 ++++++++++++------------
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/NEWS b/NEWS
index b813f4e..d4dec4c 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@
 =====
 - Fix truncated strings when loading and storing emblems (bug #7171).
 - Only erase top-level items from trash (bug #7147).
+- Don't interpret file display names as format strings (bug #7128).
 
 1.2.0
 =====
diff --git a/thunar/thunar-job.c b/thunar/thunar-job.c
index 0ac0c86..0cd0389 100644
--- a/thunar/thunar-job.c
+++ b/thunar/thunar-job.c
@@ -1,20 +1,20 @@
-/* $Id$ */
+/* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009-2011 Jannis Pohlmann <jannis at xfce.org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This program is free software; you can redistribute it and/or 
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of 
+ * the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
+ * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * You should have received a copy of the GNU General Public 
+ * License along with this program; if not, write to the Free 
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
 
@@ -578,7 +578,7 @@ thunar_job_processing_file (ThunarJob *job,
   display_name = g_filename_display_name (base_name);
   g_free (base_name);
 
-  exo_job_info_message (EXO_JOB (job), display_name);
+  exo_job_info_message (EXO_JOB (job), "%s", display_name);
   g_free (display_name);
 
   /* verify that we have total files set */



More information about the Xfce4-commits mailing list