summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Banasiak2013-02-05 20:59:41 (GMT)
committerMarcin Banasiak2013-02-05 20:59:41 (GMT)
commitfb9b7b86d18eaf41d870e51a891a30e0583b2e84 (patch)
tree4a44e7a707690b01312106d794f9d2a51a5d128a
parentf03484dee647ba07c74766e19f5bbedd13833820 (diff)
downloadcvs-fb9b7b86d18eaf41d870e51a891a30e0583b2e84.zip
cvs-fb9b7b86d18eaf41d870e51a891a30e0583b2e84.tar.gz
Fix build with -Werror=format-security
-rw-r--r--cvs-format-security.patch24
-rw-r--r--cvs.spec2
2 files changed, 26 insertions, 0 deletions
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);
+ }
+
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