Message ID | CAD_xR9cWzMvUUbhCvEEOt+TQmwg7m6OjCfscv9ehConcaKAmBw@mail.gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Herbert Xu |
Headers | show |
Series | Use explicit '%s' when formatting a signal name | expand |
On 06/12/2019 21:38, Stephen Oberholtzer wrote: > Dash fails to build from source on recent Debian setups, due to a non-constant > string being used as a format string, which trips over -Werror=format-security. This has already been addressed differently: <https://www.mail-archive.com/dash@vger.kernel.org/msg01626.html>, commit 15a60c2357f772ccf953772859e8f9fc124442e2. Cheers, Harald van Dijk
diff --git a/src/jobs.c b/src/jobs.c index 606d603..9728579 100644 --- a/src/jobs.c +++ b/src/jobs.c @@ -428,7 +428,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)");