diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-05-06 19:31:33 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-05-06 19:31:33 +0000 |
commit | 54c12dea61d99793b79100510894cd8224fb680b (patch) | |
tree | 707a25e08d381b39bf91bdf2920c624be84d942e | |
parent | 628f4cc1f1a917b6f58d3530fd0f1ff9763f4968 (diff) |
syslog() paranoia; never pass in a non-const buffer w/o using "%s"
-rw-r--r-- | usr.sbin/dhcp/common/errwarn.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/dhcp/common/errwarn.c b/usr.sbin/dhcp/common/errwarn.c index a76e46254df..7916ae04e0e 100644 --- a/usr.sbin/dhcp/common/errwarn.c +++ b/usr.sbin/dhcp/common/errwarn.c @@ -65,7 +65,7 @@ void error (char * fmt, ...) va_end (list); #ifndef DEBUG - syslog (log_priority | LOG_ERR, mbuf); + syslog (log_priority | LOG_ERR, "%s", mbuf); #endif /* Also log it to stderr? */ @@ -98,7 +98,7 @@ int warn (char * fmt, ...) va_end (list); #ifndef DEBUG - syslog (log_priority | LOG_ERR, mbuf); + syslog (log_priority | LOG_ERR, "%s", mbuf); #endif if (log_perror) { @@ -124,7 +124,7 @@ int note (char * fmt, ...) va_end (list); #ifndef DEBUG - syslog (log_priority | LOG_INFO, mbuf); + syslog (log_priority | LOG_INFO, "%s", mbuf); #endif if (log_perror) { @@ -150,7 +150,7 @@ int debug (char * fmt, ...) va_end (list); #ifndef DEBUG - syslog (log_priority | LOG_DEBUG, mbuf); + syslog (log_priority | LOG_DEBUG, "%s", mbuf); #endif if (log_perror) { @@ -214,8 +214,8 @@ int parse_warn (char * fmt, ...) va_end (list); #ifndef DEBUG - syslog (log_priority | LOG_ERR, mbuf); - syslog (log_priority | LOG_ERR, token_line); + syslog (log_priority | LOG_ERR, "%s", mbuf); + syslog (log_priority | LOG_ERR, "%s", token_line); if (lexline < 81) syslog (log_priority | LOG_ERR, "%s^", &spaces [sizeof spaces - lexchar]); |