summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-08-18 20:50:03 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-08-18 20:50:03 +0000
commit6e5f789df65574e2aa594128398b8a37788805d3 (patch)
tree74a84ad550cc4c8fad15f65b4909edad6bda4aa6 /sbin/isakmpd
parentf8a38455e6fe3bd731393fead4bc47d455a29ab8 (diff)
careful with snprintf() == -1; ho, provos
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/isakmpd/log.c b/sbin/isakmpd/log.c
index 05d2950191a..5697e04545e 100644
--- a/sbin/isakmpd/log.c
+++ b/sbin/isakmpd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.21 2001/07/10 10:47:37 ho Exp $ */
+/* $OpenBSD: log.c,v 1.22 2001/08/18 20:50:02 deraadt Exp $ */
/* $EOM: log.c,v 1.30 2000/09/29 08:19:23 niklas Exp $ */
/*
@@ -154,7 +154,7 @@ _log_print (int error, int syslog_level, const char *fmt, va_list ap,
time_t t;
len = vsnprintf (buffer, LOG_SIZE, fmt, ap);
- if (len < LOG_SIZE - 1 && error)
+ if (len > 0 && len < LOG_SIZE - 1 && error)
snprintf (buffer + len, LOG_SIZE - len, ": %s", strerror (errno));
if (log_output)
{