diff options
Diffstat (limited to 'meta-initramfs/recipes-devtools/klibc/files/0001-dash-Specify-format-string-in-fmtstr.patch')
| -rw-r--r-- | meta-initramfs/recipes-devtools/klibc/files/0001-dash-Specify-format-string-in-fmtstr.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta-initramfs/recipes-devtools/klibc/files/0001-dash-Specify-format-string-in-fmtstr.patch b/meta-initramfs/recipes-devtools/klibc/files/0001-dash-Specify-format-string-in-fmtstr.patch new file mode 100644 index 0000000000..46a23987f5 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/files/0001-dash-Specify-format-string-in-fmtstr.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | From 8beffe501c1ac5b35d62004735c4157c74183901 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 9 Jul 2017 13:51:25 -0700 | ||
| 4 | Subject: [PATCH] dash: Specify format string in fmtstr() | ||
| 5 | |||
| 6 | Fixes build with hardening flags | ||
| 7 | |||
| 8 | usr/dash/jobs.c:429:3: error: format not a string literal and no format arguments [-Werror=format-security] | ||
| 9 | col = fmtstr(s, 32, strsignal(st)); | ||
| 10 | |||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | |||
| 13 | --- | ||
| 14 | usr/dash/jobs.c | 2 +- | ||
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c | ||
| 18 | index 009bbfe..299bcac 100644 | ||
| 19 | --- a/usr/dash/jobs.c | ||
| 20 | +++ b/usr/dash/jobs.c | ||
| 21 | @@ -426,7 +426,7 @@ sprint_status(char *s, int status, int sigonly) | ||
| 22 | goto out; | ||
| 23 | #endif | ||
| 24 | } | ||
| 25 | - col = fmtstr(s, 32, strsignal(st)); | ||
| 26 | + col = fmtstr(s, 32, "%s", strsignal(st)); | ||
| 27 | #ifdef WCOREDUMP | ||
| 28 | if (WCOREDUMP(status)) { | ||
| 29 | col += fmtstr(s + col, 16, " (core dumped)"); | ||
