From f7a19d392a4724b42dc8b8fc81f6ad13b7d40b9f Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sat, 22 Jun 2013 17:08:15 +0100 Subject: [PATCH] client/tripectl.c: Fix stupid format-string bugs. Organization: Straylight/Edgeware From: Mark Wooding Possibly exploitable, but tripe's admin interface isn't usually a security boundary. --- client/tripectl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/tripectl.c b/client/tripectl.c index e5f086fd..95f95f44 100644 --- a/client/tripectl.c +++ b/client/tripectl.c @@ -163,9 +163,9 @@ static void cline(char *p, size_t len, void *b) if (!q) return; if (strcmp(q, "WARN") == 0) - dolog(LOG_WARNING, p); + dolog(LOG_WARNING, "%s", p); else if (strcmp(q, "TRACE") == 0) - dolog(LOG_DEBUG, p); + dolog(LOG_DEBUG, "%s", p); else if (!(f & f_command)) dolog(LOG_ERR, "unexpected output `%s %s'", q, p); else if (strcmp(q, "FAIL") == 0) { @@ -285,7 +285,7 @@ static void logfile(const char *name) if (logfp) writelog("error", d.buf); else if (logname) - die(EXIT_FAILURE, d.buf); + die(EXIT_FAILURE, "%s", d.buf); if (f & f_syslog) syslog(LOG_ERR, "%s", d.buf); dstr_destroy(&d); -- [mdw]