[qfaxreader] add patch to allow compiling with -Werror=format-security
wolfy
wolfy at fedoraproject.org
Tue Dec 3 05:47:02 UTC 2013
commit 3b577e400f0e86054922a3052a0910bdcc8a610f
Author: Manuel Wolfshant <wolfy at fedoraproject.org>
Date: Tue Dec 3 07:46:10 2013 +0200
add patch to allow compiling with -Werror=format-security
qfaxreader-0.3.1-format-security.patch | 12 ++++++++++++
qfaxreader.spec | 10 ++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/qfaxreader-0.3.1-format-security.patch b/qfaxreader-0.3.1-format-security.patch
new file mode 100644
index 0000000..3bd212f
--- /dev/null
+++ b/qfaxreader-0.3.1-format-security.patch
@@ -0,0 +1,12 @@
+diff -up qfaxreader-0.3.1/tools/bin2c.c.orig qfaxreader-0.3.1/tools/bin2c.c
+--- qfaxreader-0.3.1/tools/bin2c.c.orig 2013-12-03 06:56:47.420337885 +0200
++++ qfaxreader-0.3.1/tools/bin2c.c 2013-12-03 06:59:15.300136133 +0200
+@@ -20,7 +20,7 @@ int main(int argc, char **argv)
+ return 2;
+ }
+
+- snprintf(file, sizeof(file), argv[1]);
++ snprintf(file, sizeof(file), "%s",argv[1]);
+ file[256] = 0;
+
+ for(i = 0; file[i]; i++)
diff --git a/qfaxreader.spec b/qfaxreader.spec
index 077c44a..302b662 100644
--- a/qfaxreader.spec
+++ b/qfaxreader.spec
@@ -2,11 +2,12 @@ Name: qfaxreader
License: GPLv2+
Group: Applications/Communications
Version: 0.3.1
-Release: 19%{dist}
+Release: 20%{dist}
Summary: A multipage monochrome/color TIFF/FAX viewer
Source: http://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
Patch0: qfaxreader-parallel_build.patch
Patch1: qfaxreader-gcc4.3.0-configure.patch
+Patch2: qfaxreader-0.3.1-format-security.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
URL: http://qfaxreader.sourceforge.net/
BuildRequires: qt3-devel , libtiff-devel, gdbm-devel
@@ -38,17 +39,19 @@ Features:
%setup -q
%patch0 -p1 -b .parallel_make
%patch1 -p1 -b .gcc430
-
+%patch2 -p1 -b .format
%build
%if "0%{?dist}" >= "0.fc19"
autoconf
%endif
%if "0%{?dist}" >= "0.fc20"
+#CFLAGS="$RPM_OPT_FLAGS -Werror=format-security" CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} \
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} \
--with-docdir=%{_defaultdocdir}/%{name} --datadir=%{_datadir} \
--mandir=%{_mandir} --libdir=%{_libdir}
%else
+#CFLAGS="$RPM_OPT_FLAGS -Werror=format-security" CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} \
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} \
--with-docdir=%{_defaultdocdir}/%{name}-%{version} --datadir=%{_datadir} \
--mandir=%{_mandir} --libdir=%{_libdir}
@@ -102,6 +105,9 @@ fi
%changelog
+* Tue Dec 03 2013 Manuel "lonely wolf" Wolfshant <wolfy at fedoraproject.org> - 0.3.1-20
+- build with "-Werror=format-security" flag
+
* Mon Aug 05 2013 Manuel "lonely wolf" Wolfshant <wolfy at fedoraproject.org> - 0.3.1-19
- fix unversioned docdir
More information about the scm-commits
mailing list