File: hardening-formatstring.diff

package info (click to toggle)
bash 4.2%2Bdfsg-0.1%2Bdeb7u3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,308 kB
  • sloc: ansic: 452; sh: 418; makefile: 385
file content (15 lines) | stat: -rw-r--r-- 493 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
--- a/bash/print_cmd.c	2009-09-16 21:32:26.000000000 +0200
+++ b/bash/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