blob: 46a23987f5380dea7d37e0782f1219add65e1e8f [file] [log] [blame]
From 8beffe501c1ac5b35d62004735c4157c74183901 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 9 Jul 2017 13:51:25 -0700
Subject: [PATCH] dash: Specify format string in fmtstr()
Fixes build with hardening flags
usr/dash/jobs.c:429:3: error: format not a string literal and no format arguments [-Werror=format-security]
col = fmtstr(s, 32, strsignal(st));
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
usr/dash/jobs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c
index 009bbfe..299bcac 100644
--- a/usr/dash/jobs.c
+++ b/usr/dash/jobs.c
@@ -426,7 +426,7 @@ sprint_status(char *s, int status, int sigonly)
goto out;
#endif
}
- col = fmtstr(s, 32, strsignal(st));
+ col = fmtstr(s, 32, "%s", strsignal(st));
#ifdef WCOREDUMP
if (WCOREDUMP(status)) {
col += fmtstr(s + col, 16, " (core dumped)");