[packages/patchutils] - added format patch (fixes build with -Werror=format-security)

qboosh qboosh at pld-linux.org
Thu Jul 11 17:03:30 CEST 2013


commit c107d5b827f63918fa815ad9e76ffdcde68cabf6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Jul 11 17:03:18 2013 +0200

    - added format patch (fixes build with -Werror=format-security)

 patchutils-format.patch | 20 ++++++++++++++++++++
 patchutils.spec         |  2 ++
 2 files changed, 22 insertions(+)
---
diff --git a/patchutils.spec b/patchutils.spec
index f39180c..24f3654 100644
--- a/patchutils.spec
+++ b/patchutils.spec
@@ -10,6 +10,7 @@ License:	GPL v2+
 Group:		Applications/Text
 Source0:	http://cyberelk.net/tim/data/patchutils/stable/%{name}-%{version}.tar.xz
 # Source0-md5:	b640b6b8af6183f83eacf7bd6d2460cb
+Patch0:		%{name}-format.patch
 Patch1:		%{name}-fixcvsdiff.patch
 URL:		http://cyberelk.net/tim/patchutils/
 BuildRequires:	perl-base
@@ -136,6 +137,7 @@ patch-файлів непотрібних patch'ів на основі шабл
 
 %prep
 %setup -q
+%patch0 -p1
 %patch1 -p0
 
 %build
diff --git a/patchutils-format.patch b/patchutils-format.patch
new file mode 100644
index 0000000..9a6bba5
--- /dev/null
+++ b/patchutils-format.patch
@@ -0,0 +1,20 @@
+--- patchutils-0.3.3/src/filterdiff.c.orig	2011-05-26 15:47:46.000000000 +0200
++++ patchutils-0.3.3/src/filterdiff.c	2013-07-11 16:31:31.894473188 +0200
+@@ -1263,7 +1263,7 @@
+ 			char errstr[300];
+ 			regerror (err, &regex[num_regex - 1], errstr,
+ 				  sizeof (errstr));
+-			error (EXIT_FAILURE, 0, errstr);
++			error (EXIT_FAILURE, 0, "%s", errstr);
+ 			exit (1);
+ 		}
+ 	}
+@@ -1509,7 +1509,7 @@
+ 			char errstr[300];
+ 			regerror (err, &regex[num_regex - 1], errstr,
+ 				  sizeof (errstr));
+-			error (EXIT_FAILURE, 0, errstr);
++			error (EXIT_FAILURE, 0, "%s", errstr);
+ 			exit (1);
+ 		}
+ 	}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/patchutils.git/commitdiff/c107d5b827f63918fa815ad9e76ffdcde68cabf6



More information about the pld-cvs-commit mailing list