Browse Source

fix gcc format security errors

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens 8 years ago
parent
commit
8476a03b25
2 changed files with 3 additions and 3 deletions
  1. 1 1
      autofs.c
  2. 2 2
      log.c

+ 1 - 1
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';

+ 2 - 2
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);
 }