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

megabajt megabajt at pld-linux.org
Wed Feb 13 22:32:46 CET 2013


commit df91bec4b63472d19fcb4de17990b4d6e5078a42
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date:   Wed Feb 13 22:32:12 2013 +0100

    Fix build with -Werror=format-security

 tcsh-format-security.patch | 11 +++++++++++
 tcsh.spec                  |  3 +++
 2 files changed, 14 insertions(+)
---
diff --git a/tcsh.spec b/tcsh.spec
index fd83f6c..c8a5aab 100644
--- a/tcsh.spec
+++ b/tcsh.spec
@@ -31,6 +31,7 @@ Patch2:		%{name}-no-timestamp-history.patch
 Patch3:		%{name}-time.patch
 Patch4:		%{name}-rlimit_locks.patch
 Patch5:		%{name}-no_TERMCAP.patch
+Patch6:		%{name}-format-security.patch
 URL:		http://www.tcsh.org/Home
 BuildRequires:	autoconf >= 2.59
 BuildRequires:	automake
@@ -120,8 +121,10 @@ W tym pakiecie jest statycznie skonsolidowany tcsh.
 %patch3	-p1
 %patch4	-p1
 %patch5 -p1
+%patch6 -p1
 
 %build
+mkdir m4
 cp /usr/share/automake/config.sub .
 %{__aclocal}
 %{__autoconf}
diff --git a/tcsh-format-security.patch b/tcsh-format-security.patch
new file mode 100644
index 0000000..0743798
--- /dev/null
+++ b/tcsh-format-security.patch
@@ -0,0 +1,11 @@
+--- tcsh-6.18.01/sh.func.c.formatsec	2013-02-13 22:26:11.659476651 +0100
++++ tcsh-6.18.01/sh.func.c	2013-02-13 22:28:13.118818644 +0100
+@@ -2317,7 +2317,7 @@ setlim(struct limits *lp, int hard, RLIM
+     if (setrlimit(lp->limconst, &rlim) < 0) {
+        if ( ( lp->limconst == RLIMIT_LOCKS ) &&
+ 	    ( errno == EINVAL ) ) {
+-	       xprintf(CGETS(15, 5, "cannot set it on the current kernel\n"));
++	       xprintf("%s", CGETS(15, 5, "cannot set it on the current kernel\n"));
+ 	       return(0);
+        }
+ # else /* BSDLIMIT */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tcsh.git/commitdiff/df91bec4b63472d19fcb4de17990b4d6e5078a42



More information about the pld-cvs-commit mailing list