[tnef] Fix FTBFS with -Werror=format-security (#1037361, #1107453)

Yaakov Selkowitz yselkowitz at fedoraproject.org
Tue Jul 8 03:07:08 UTC 2014


commit 0bbe0d516ef3bad7e02e5740314de7766950941b
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date:   Fri Jun 13 15:33:43 2014 -0500

    Fix FTBFS with -Werror=format-security (#1037361, #1107453)

 tnef-1.4.9-format-security.patch |   23 +++++++++++++++++++++++
 tnef.spec                        |    7 ++++++-
 2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/tnef-1.4.9-format-security.patch b/tnef-1.4.9-format-security.patch
new file mode 100644
index 0000000..783d3ef
--- /dev/null
+++ b/tnef-1.4.9-format-security.patch
@@ -0,0 +1,23 @@
+diff --git a/src/main.c b/src/main.c
+index 5059309..b1d8b0c 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -51,15 +51,15 @@
+ 
+ /* COPYRIGHTS & NO_WARRANTY -- defined to make code below a little nicer to
+    read */
+-static const char* COPYRIGHTS = \
++static const char COPYRIGHTS[] = \
+ "Copyright (C) 1999-2011 by Mark Simpson\n"
+ "Copyright (C) 1997 by Thomas Boll (original code)";
+-static const char* NO_WARRANTY = \
++static const char NO_WARRANTY[] = \
+ "%s comes with ABSOLUTELY NO WARRANTY.\n"
+ "You may redistribute copies of %s under the terms of the GNU General\n"
+ "Public License.  For more information about these matters, see the file\n"
+ "named COPYING.";
+-static const char* USAGE = \
++static const char USAGE[] = \
+ "-f FILE,--file=FILE     \tUse FILE as input ('-' == stdin)\n"
+ "-C DIR, --directory=DIR \tUnpack files into DIR\n"
+ "-x SIZE --maxsize=SIZE  \tLimit maximum size of extracted archive (bytes)\n"
diff --git a/tnef.spec b/tnef.spec
index ef1683f..f22afdc 100644
--- a/tnef.spec
+++ b/tnef.spec
@@ -1,6 +1,6 @@
 Name:      tnef
 Version:   1.4.9
-Release:   4%{?dist}
+Release:   5%{?dist}
 Summary:   Extract files from email attachments like WINMAIL.DAT
 
 Group:     Applications/Archiving
@@ -14,6 +14,7 @@ Source1:   vnd.ms-tnef.desktop
 Source2:   tnef-extract.desktop
 Source3:   tnefextract.desktop
 Source4:   tnef.sh
+Patch0:    tnef-1.4.9-format-security.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires: kde-filesystem
@@ -56,6 +57,7 @@ Provides a right-click extract menu item for Dolphin to extract TNEF files.
 
 %prep
 %setup -q
+%patch0 -p1
 
 
 %build
@@ -127,6 +129,9 @@ make check DESTDIR=%{buildroot}
 
 
 %changelog
+* Fri Jun 13 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 1.4.9-5
+- Fix FTBFS with -Werror=format-security (#1037361, #1107453)
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.9-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list