[OpenWrt-Devel] [PATCH mountd] fix gcc format security errors
Hauke Mehrtens
hauke at hauke-m.de
Sun Nov 22 09:43:09 EST 2015
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
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.6.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list