[packages/cvs] Fix build with -Werror=format-security

megabajt megabajt at pld-linux.org
Tue Feb 5 22:00:10 CET 2013


commit fb9b7b86d18eaf41d870e51a891a30e0583b2e84
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date:   Tue Feb 5 21:59:41 2013 +0100

    Fix build with -Werror=format-security

 cvs-format-security.patch | 24 ++++++++++++++++++++++++
 cvs.spec                  |  2 ++
 2 files changed, 26 insertions(+)
---
diff --git a/cvs.spec b/cvs.spec
index ff6c216..46200ba 100644
--- a/cvs.spec
+++ b/cvs.spec
@@ -32,6 +32,7 @@ Patch9:		%{name}-getcwd.patch
 Patch10:	%{name}-ac.patch
 Patch11:	%{name}-printf-n.patch
 Patch12:	%{name}-am.patch
+Patch13:	%{name}-format-security.patch
 
 # patches from debian
 Patch100:	%{name}-debian-64bit-crash.patch
@@ -241,6 +242,7 @@ pserver.
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
+%patch13 -p1
 
 %patch100 -p1
 %patch101 -p1
diff --git a/cvs-format-security.patch b/cvs-format-security.patch
new file mode 100644
index 0000000..106cc96
--- /dev/null
+++ b/cvs-format-security.patch
@@ -0,0 +1,24 @@
+diff -urN cvs-1.12.13/diff/diff3.c cvs-1.12.13.new/diff/diff3.c
+--- cvs-1.12.13/diff/diff3.c	2004-10-09 17:51:52.000000000 +0200
++++ cvs-1.12.13.new/diff/diff3.c	2013-02-05 21:38:47.024405045 +0100
+@@ -1503,7 +1503,7 @@
+ 	      line = 0;
+ 	      do
+ 		{
+-		  printf_output (line_prefix);
++		  printf_output ("%s", line_prefix);
+ 		  cp = D_RELNUM (ptr, realfile, line);
+ 		  length = D_RELLEN (ptr, realfile, line);
+ 		  write_output (cp, length);
+diff -urN cvs-1.12.13/src/main.c cvs-1.12.13.new/src/main.c
+--- cvs-1.12.13/src/main.c	2013-02-05 21:33:06.000000000 +0100
++++ cvs-1.12.13.new/src/main.c	2013-02-05 21:43:02.996351658 +0100
+@@ -1475,7 +1475,7 @@
+ {
+     (void) fprintf (stderr, *cpp++, program_name, cvs_cmd_name);
+     for (; *cpp; cpp++)
+-	(void) fprintf (stderr, *cpp);
++	(void) fputs (*cpp, stderr);
+     exit (EXIT_FAILURE);
+ }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cvs.git/commitdiff/fb9b7b86d18eaf41d870e51a891a30e0583b2e84



More information about the pld-cvs-commit mailing list