From 8476a03b25d457e99f59e6372b8d9faebe2266f8 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 22 Nov 2015 15:43:09 +0100 Subject: [PATCH] fix gcc format security errors Signed-off-by: Hauke Mehrtens --- autofs.c | 2 +- log.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autofs.c b/autofs.c index 5f8810e..4ad782d 100644 --- a/autofs.c +++ b/autofs.c @@ -194,7 +194,7 @@ static void autofs_init(void) p = ucix_get_option(ctx, "mountd", "mountd", "path"); ucix_cleanup(ctx); if(p) - snprintf(uci_path, 31, p); + snprintf(uci_path, 31, "%s", p); else snprintf(uci_path, 31, "/tmp/mounts/"); uci_path[31] = '\0'; diff --git a/log.c b/log.c index ae7a7c9..8ef4d5a 100644 --- a/log.c +++ b/log.c @@ -26,7 +26,7 @@ void log_printf(char *fmt, ...) va_end(ap); if(daemonize) - syslog(10, p); + syslog(10, "%s", p); else - printf(p); + printf("%s", p); } -- 2.25.1