summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch35
-rw-r--r--meta/recipes-extended/bash/bash_4.3.30.bb1
2 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch b/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch
new file mode 100644
index 0000000000..5405c84c78
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch
@@ -0,0 +1,35 @@
1From e5837a42f8f48a6a721805ff8f7fcd32861d09ca Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
3Date: Tue, 26 Jul 2016 13:09:47 +0100
4Subject: [PATCH] help: fix printf() format security warning
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9| ../../bash-4.3.30/builtins/../../bash-4.3.30/builtins/help.def: In function 'help_builtin':
10| ../../bash-4.3.30/builtins/../../bash-4.3.30/builtins/help.def:130:7: error: format not a string literal and no format arguments [-Werror=format-security]
11| printf (ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1)));
12| ^~~~~~
13
14Signed-off-by: André Draszik <adraszik@tycoint.com>
15---
16Upstream-Status: Pending
17 builtins/help.def | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/builtins/help.def b/builtins/help.def
21index 1894f17..cf624c6 100644
22--- a/builtins/help.def
23+++ b/builtins/help.def
24@@ -127,7 +127,7 @@ help_builtin (list)
25
26 if (glob_pattern_p (list->word->word))
27 {
28- printf (ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1)));
29+ printf ("%s", ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1)));
30 print_word_list (list, ", ");
31 printf ("'\n\n");
32 }
33--
342.8.1
35
diff --git a/meta/recipes-extended/bash/bash_4.3.30.bb b/meta/recipes-extended/bash/bash_4.3.30.bb
index 95ed3925c7..16a3139a2f 100644
--- a/meta/recipes-extended/bash/bash_4.3.30.bb
+++ b/meta/recipes-extended/bash/bash_4.3.30.bb
@@ -21,6 +21,7 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
21 file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \ 21 file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \
22 file://run-ptest \ 22 file://run-ptest \
23 file://fix-run-builtins.patch \ 23 file://fix-run-builtins.patch \
24 file://0001-help-fix-printf-format-security-warning.patch \
24 " 25 "
25 26
26SRC_URI[tarball.md5sum] = "a27b3ee9be83bd3ba448c0ff52b28447" 27SRC_URI[tarball.md5sum] = "a27b3ee9be83bd3ba448c0ff52b28447"