[packages/gnome-commander] - fix errors caused by -Wformat-security - rel 2
baggins
baggins at pld-linux.org
Tue Nov 20 14:38:45 CET 2012
commit f19682df54cc524f59bbd1ded36f2016882a863b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Nov 20 14:38:27 2012 +0100
- fix errors caused by -Wformat-security
- rel 2
gnome-commander-format-security.patch | 86 +++++++++++++++++++++++++++++++++++
gnome-commander.spec | 4 +-
2 files changed, 89 insertions(+), 1 deletion(-)
---
diff --git a/gnome-commander.spec b/gnome-commander.spec
index 1a4f3fa..cf4b66d 100644
--- a/gnome-commander.spec
+++ b/gnome-commander.spec
@@ -2,7 +2,7 @@ Summary: A GNOME filemanager similar to the Midnight Commander
Summary(pl.UTF-8): Zarządca plików dla środowiska GNOME w stylu Midnight Commandera
Name: gnome-commander
Version: 1.2.8.15
-Release: 1
+Release: 2
License: GPL v2+
Group: X11/Applications
Source0: http://ftp.gnome.org/pub/GNOME/sources/gnome-commander/1.2/%{name}-%{version}.tar.xz
@@ -10,6 +10,7 @@ Source0: http://ftp.gnome.org/pub/GNOME/sources/gnome-commander/1.2/%{name}-%{ve
Patch0: %{name}-flags.patch
Patch1: %{name}-1.2.8.15-poppler020.patch
Patch2: %{name}-gcc47.patch
+Patch3: %{name}-format-security.patch
URL: http://www.nongnu.org/gcmd/
BuildRequires: autoconf
BuildRequires: automake
@@ -53,6 +54,7 @@ kilka dodatkowych jak np. klienta FTP.
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
%{__glib_gettextize}
diff --git a/gnome-commander-format-security.patch b/gnome-commander-format-security.patch
new file mode 100644
index 0000000..e8f0db9
--- /dev/null
+++ b/gnome-commander-format-security.patch
@@ -0,0 +1,86 @@
+--- gnome-commander-1.2.8.15/libgcmd/libgcmd-widget-factory.cc~ 2011-12-06 20:10:27.000000000 +0100
++++ gnome-commander-1.2.8.15/libgcmd/libgcmd-widget-factory.cc 2012-11-20 14:28:29.542265649 +0100
+@@ -652,7 +652,7 @@
+ va_end (argptr);
+
+ dialog = gtk_message_dialog_new (GTK_WINDOW (main_win_widget), GTK_DIALOG_MODAL,
+- GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, string);
++ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", string);
+
+ gtk_signal_connect (GTK_OBJECT (dialog), "response", GTK_SIGNAL_FUNC (on_response), dialog);
+
+@@ -673,7 +673,7 @@
+
+ dialog = gtk_message_dialog_new (
+ GTK_WINDOW (main_win_widget), GTK_DIALOG_MODAL,
+- GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, msg);
++ GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, "%s", msg);
+
+ gtk_signal_connect (GTK_OBJECT (dialog), "response",
+ GTK_SIGNAL_FUNC (on_response), dialog);
+--- gnome-commander-1.2.8.15/src/utils.h~ 2011-12-06 20:10:29.000000000 +0100
++++ gnome-commander-1.2.8.15/src/utils.h 2012-11-20 14:29:31.845596785 +0100
+@@ -256,10 +256,10 @@
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+- message.c_str());
++ "%s", message.c_str());
+
+ if (secondary_text)
+- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dlg), secondary_text);
++ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dlg), "%s", secondary_text);
+
+ gtk_dialog_run (GTK_DIALOG (dlg));
+ gtk_widget_destroy (dlg);
+--- gnome-commander-1.2.8.15/src/gnome-cmd-prepare-xfer-dialog.cc~ 2011-12-06 20:10:28.000000000 +0100
++++ gnome-commander-1.2.8.15/src/gnome-cmd-prepare-xfer-dialog.cc 2012-11-20 14:31:12.308926576 +0100
+@@ -192,7 +192,7 @@
+ (GtkDialogFlags) 0,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_OK_CANCEL,
+- msg);
++ "%s", msg);
+ gint choice = gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+ g_free (msg);
+--- gnome-commander-1.2.8.15/src/gnome-cmd-xml-config.cc~ 2011-12-06 20:10:28.000000000 +0100
++++ gnome-commander-1.2.8.15/src/gnome-cmd-xml-config.cc 2012-11-20 14:31:58.785591601 +0100
+@@ -546,7 +546,7 @@
+ if (!g_markup_parse_context_parse (context, xml, xml_len, &error) ||
+ !g_markup_parse_context_end_parse (context, &error))
+ {
+- g_warning (error->message);
++ g_warning ("%s", error->message);
+ g_error_free (error);
+ }
+
+@@ -567,7 +567,7 @@
+
+ if (!g_file_get_contents (path, &xml, &xml_len, &error))
+ {
+- g_warning (error->message);
++ g_warning ("%s", error->message);
+ g_error_free (error);
+
+ return FALSE;
+--- gnome-commander-1.2.8.15/src/utils.cc~ 2011-12-06 20:10:29.000000000 +0100
++++ gnome-commander-1.2.8.15/src/utils.cc 2012-11-20 14:32:47.258923226 +0100
+@@ -193,7 +193,7 @@
+ button_titles = convert_varargs_to_name_array (button_title_args);
+ va_end (button_title_args);
+
+- dialog = gtk_message_dialog_new (GTK_WINDOW (main_win), GTK_DIALOG_MODAL, msg_type, GTK_BUTTONS_NONE, text);
++ dialog = gtk_message_dialog_new (GTK_WINDOW (main_win), GTK_DIALOG_MODAL, msg_type, GTK_BUTTONS_NONE, "%s", text);
+ if (title)
+ gtk_window_set_title (GTK_WINDOW (dialog), title);
+
+@@ -590,7 +590,7 @@
+ {
+ gchar *msg = g_strdup_printf (_("%s does not know how to open remote file. Do you want to download the file to a temporary location and then open it?"), gnome_cmd_app_get_name (app));
+ GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (main_win), GTK_DIALOG_MODAL,
+- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, msg);
++ GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", msg);
+ TmpDlData *dldata = g_new0 (TmpDlData, 1);
+ args[0] = (gpointer) app;
+ // args[2] is NULL here (don't set exec dir for temporarily downloaded files)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gnome-commander.git/commitdiff/f19682df54cc524f59bbd1ded36f2016882a863b
More information about the pld-cvs-commit
mailing list