From 8c545bbfa8a9fd984437a61c3f0556822ad6ad92 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 22 Mar 2013 10:41:57 +0000 Subject: [PATCH] Don't try to print unterminated strings when loading configuration file. --- cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg.c b/cfg.c index 1967fe99..92e0bb45 100644 --- a/cfg.c +++ b/cfg.c @@ -97,7 +97,7 @@ load_cfg(const char *path, struct cmd_ctx *ctxin, struct causelist *causes) /* Trim \n. */ if (buf[len - 1] == '\n') len--; - log_debug ("%s: %s", path, buf); + log_debug("%s: %.*s", path, (int)len, buf); /* Current line is the continuation of the previous one. */ if (line != NULL) {