tags 641350 + patch
thanks
Hi,
The attached patch fixes the build error for bash with
-Werror=format-security
BR,
Pierre
diff -ruN bash-4.1.orig/debian/patches/harden-formatstring.dpatch bash-4.1/debian/patches/harden-formatstring.dpatch
--- bash-4.1.orig/debian/patches/harden-formatstring.dpatch 1970-01-01 01:00:00.000000000 +0100
+++ bash-4.1/debian/patches/harden-formatstring.dpatch 2011-10-04 20:49:52.532989904 +0200
@@ -0,0 +1,34 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: <your description>
+
+Author: Pierre Chifflier
+Description: Fix build error with -Werror=format-security hardening flag.
+
+diff -ruN bash-4.1.orig/print_cmd.c bash-4.1/print_cmd.c
+--- bash-4.1.orig/print_cmd.c 2009-09-16 21:32:26.000000000 +0200
++++ bash-4.1/print_cmd.c 2011-09-16 11:38:40.000000000 +0200
+@@ -1374,7 +1374,7 @@
+ for (i = 0; amount > 0; amount--)
+ indentation_string[i++] = ' ';
+ indentation_string[i] = '\0';
+- cprintf (indentation_string);
++ cprintf ("%s", indentation_string);
+ }
+
+ static void
diff -ruN bash-4.1.orig/debian/rules bash-4.1/debian/rules
--- bash-4.1.orig/debian/rules 2011-10-04 20:47:34.000000000 +0200
+++ bash-4.1/debian/rules 2011-10-04 20:48:20.636991913 +0200
@@ -523,6 +526,7 @@
exec-redirections-man \
bash-aliases-repeat \
builtins-declare-fix \
+ harden-formatstring \
ifeq ($(with_gfdl),yes)
debian_patches += \