[stardict] Fix build with -Werror=format-security (BZ#1037338)

李瑞彬 cheeselee at fedoraproject.org
Wed Dec 4 03:21:19 UTC 2013


commit b3c5ac58b5d1f12b41469d3093431351a3103900
Author: Robin Lee <cheeselee at fedoraproject.org>
Date:   Wed Dec 4 11:20:16 2013 +0800

    Fix build with -Werror=format-security (BZ#1037338)

 stardict-3.0.4-format-security.patch |   11 +++++++++++
 stardict.spec                        |   10 +++++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/stardict-3.0.4-format-security.patch b/stardict-3.0.4-format-security.patch
new file mode 100644
index 0000000..aa180ff
--- /dev/null
+++ b/stardict-3.0.4-format-security.patch
@@ -0,0 +1,11 @@
+diff -r f9712771e445 dict/src/desktop.cpp
+--- a/dict/src/desktop.cpp	Fri Mar 29 07:30:29 2013 +0800
++++ b/dict/src/desktop.cpp	Wed Dec 04 11:12:38 2013 +0800
+@@ -262,6 +262,7 @@
+ 			GTK_DIALOG_MODAL,
+ 			GTK_MESSAGE_WARNING,
+ 			GTK_BUTTONS_YES_NO,
++			"%s",
+ 			msg);
+ 	bool confirmed = false;
+ 	gint response = gtk_dialog_run (GTK_DIALOG (dialog));
diff --git a/stardict.spec b/stardict.spec
index 0edbe3f..2180eb4 100644
--- a/stardict.spec
+++ b/stardict.spec
@@ -1,13 +1,17 @@
 Name:           stardict
 Summary:        A powerful dictionary platform written in GTK+2
 Version:        3.0.4
-Release:        7%{?dist}
+Release:        8%{?dist}
 Group:          Applications/System
 License:        GPLv3
 URL:            http://code.google.com/p/stardict-3/
 Source0:        http://stardict-3.googlecode.com/files/%{name}-%{version}.tar.bz2
 # http://code.google.com/p/stardict-3/issues/detail?id=45
+# applied in upstream hg597
 Patch1:         stardict-3.0.4-configure.patch
+# fix build with -Werror=format-security
+# backported from upstream hg597
+Patch2:         stardict-3.0.4-format-security.patch
 
 # Required by autogen.sh
 BuildRequires: autoconf, automake, libtool, gettext
@@ -35,6 +39,7 @@ scan selection, and fuzzy matching.
 %prep
 %setup -q
 %patch1 -p1 -b .configure
+%patch2 -p1 -b .format-security
 
 # Remove unneeded sigc++ header files to make it sure
 # that we are using system-wide libsigc++
@@ -94,6 +99,9 @@ rm dict/doc/{Makefile*,Readme.mac,README_windows.txt}
 
 
 %changelog
+* Wed Dec  4 2013 Robin Lee <cheeselee at fedoraproject.org> - 3.0.4-8
+- Fix build with -Werror=format-security (BZ#1037338)
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.0.4-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list