summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2003-12-09 22:41:06 +0000
committerderaadt <deraadt@openbsd.org>2003-12-09 22:41:06 +0000
commitad8671d20ae785a4f1229ccfa879341623d2fde2 (patch)
tree783cf8db8e89a00c105ea59a64b21d92d48cc337
parentrename keepalive to tcpkeepalive; the old name causes too much (diff)
downloadwireguard-openbsd-ad8671d20ae785a4f1229ccfa879341623d2fde2.tar.xz
wireguard-openbsd-ad8671d20ae785a4f1229ccfa879341623d2fde2.zip
preventative measure against format string problem; from art, via
bruno & grange
-rw-r--r--libexec/identd/error.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/identd/error.h b/libexec/identd/error.h
index f7df430ba2e..01d10264d87 100644
--- a/libexec/identd/error.h
+++ b/libexec/identd/error.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: error.h,v 1.4 2002/07/16 10:25:47 deraadt Exp $*/
+/* $OpenBSD: error.h,v 1.5 2003/12/09 22:41:06 deraadt Exp $*/
/*
**
@@ -17,11 +17,11 @@
#include <syslog.h>
-#define ERROR(fmt) \
- ((syslog_flag ? (syslog(LOG_ERR, fmt),0) : 0), \
+#define ERROR(msg) \
+ ((syslog_flag ? (syslog(LOG_ERR, "%s", msg),0) : 0), \
(debug_flag ? (fprintf(stderr, "%d , %d : ERROR : X-DBG : ", \
lport, fport), \
- fprintf(stderr, fmt), perror(": "), 0) : \
+ fprintf(stderr, "%s", msg), perror(": "), 0) : \
(printf("%d , %d : ERROR : UNKNOWN-ERROR\r\n", lport, fport), 0)), \
fflush(stdout), fflush(stderr), exit(1), 0)