[min12xxw] Make it build with "-Werror=format-security" flag (#1037198)

Jiří Popelka jpopelka at fedoraproject.org
Tue Dec 3 10:40:48 UTC 2013


commit c3ff76df486d3612dffddf70299bc81d479081ad
Author: Jiri Popelka <jpopelka at redhat.com>
Date:   Tue Dec 3 11:40:09 2013 +0100

    Make it build with "-Werror=format-security" flag (#1037198)

 min12xxw-format-security.patch |   12 ++++++++++++
 min12xxw.spec                  |   15 ++++++++-------
 2 files changed, 20 insertions(+), 7 deletions(-)
---
diff --git a/min12xxw-format-security.patch b/min12xxw-format-security.patch
new file mode 100644
index 0000000..7d1435a
--- /dev/null
+++ b/min12xxw-format-security.patch
@@ -0,0 +1,12 @@
+diff -up min12xxw-0.0.9/min12xxw.c.format-security min12xxw-0.0.9/min12xxw.c
+--- min12xxw-0.0.9/min12xxw.c.format-security	2005-12-31 14:50:48.000000000 +0100
++++ min12xxw-0.0.9/min12xxw.c	2013-12-03 11:35:14.445746059 +0100
+@@ -725,7 +725,7 @@ static void printav(char *msg, struct ma
+ {
+ 	int i, n;
+ 	
+-	n = printf(msg);
++	n = printf("%s", msg);
+ 	/* print all available somethings from our map */
+ 	for (i = 0; m[i].str != NULL; i++) {
+ 		/* in case we had to start a new line below, we need to
diff --git a/min12xxw.spec b/min12xxw.spec
index 79ae3ba..6af637c 100644
--- a/min12xxw.spec
+++ b/min12xxw.spec
@@ -1,14 +1,14 @@
 Name:           min12xxw
 Version:        0.0.9
-Release:        10%{?dist}
+Release:        11%{?dist}
 Summary:        Converts PBM stream to Minolta printer language
 
 Group:          System Environment/Libraries
 License:        GPLv2+
 URL:            http://www.hinterbergen.de/mala/min12xxw/
 Source0:        http://www.hinterbergen.de/mala/min12xxw/min12xxw-0.0.9.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+Patch0:         min12xxw-format-security.patch
 #Though it includes no translations, who this doesn't matter really for now.
 #The translation of both the package and SPEC (Summary and %desciption) are
 #considered a TODO
@@ -22,25 +22,26 @@ by the PostScript Description files of the drivers from the foomatic package.
 %prep
 %setup -q
 
+# Make it build with "-Werror=format-security" flag (#1037198)
+%patch0 -p1 -b .format-security
+
 %build
 %configure
 make %{?_smp_mflags}
 
 %install
-rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
-%defattr(-,root,root,-)
 %{_bindir}/esc-m
 %{_bindir}/min12xxw
 %{_mandir}/man1/min12xxw.1.gz
 %doc AUTHORS ChangeLog NEWS README COPYING format.txt
 
 %changelog
+* Tue Dec 03 2013 Jiri Popelka <jpopelka at redhat.com> - 0.0.9-11
+- Make it build with "-Werror=format-security" flag (#1037198)
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.0.9-10
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list