[PATCH] Use explicit '%s' when formatting a signal name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
---
 src/jobs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)");
--
2.20.1

--
Stephen Oberholtzer



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux