blob: 46a23987f5380dea7d37e0782f1219add65e1e8f [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From 8beffe501c1ac5b35d62004735c4157c74183901 Mon Sep 17 00:00:00 2001
Brad Bishop6e60e8b2018-02-01 10:27:11 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 9 Jul 2017 13:51:25 -0700
4Subject: [PATCH] dash: Specify format string in fmtstr()
5
6Fixes build with hardening flags
7
8usr/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
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
Brad Bishop316dfdd2018-06-25 12:45:53 -040012
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013---
14 usr/dash/jobs.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c
Brad Bishop316dfdd2018-06-25 12:45:53 -040018index 009bbfe..299bcac 100644
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019--- 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)");