summaryrefslogtreecommitdiff
path: root/lib/libwrap
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-19 07:12:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-19 07:12:43 +0000
commit36cb109beb9efb72a6d48ac7127a9f379657de1e (patch)
treeb109e47cd2026a61932f39e6c8296632a44e5350 /lib/libwrap
parent8be025d256ee6bb72fd3f36daa2a1adc4b8011f1 (diff)
use more snprintf
Diffstat (limited to 'lib/libwrap')
-rw-r--r--lib/libwrap/diag.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libwrap/diag.c b/lib/libwrap/diag.c
index 31c0a65ad45..2a7e3e45f4e 100644
--- a/lib/libwrap/diag.c
+++ b/lib/libwrap/diag.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diag.c,v 1.3 2002/06/07 00:05:09 itojun Exp $ */
+/* $OpenBSD: diag.c,v 1.4 2002/06/19 07:12:42 deraadt Exp $ */
/*
* Routines to report various classes of problems. Each report is decorated
@@ -15,7 +15,7 @@
#if 0
static char sccsid[] = "@(#) diag.c 1.1 94/12/28 17:42:20";
#else
-static char rcsid[] = "$OpenBSD: diag.c,v 1.3 2002/06/07 00:05:09 itojun Exp $";
+static char rcsid[] = "$OpenBSD: diag.c,v 1.4 2002/06/19 07:12:42 deraadt Exp $";
#endif
#endif
@@ -47,10 +47,10 @@ va_list ap;
char fmt[BUFSIZ];
if (tcpd_context.file)
- sprintf(fmt, "%s: %s, line %d: %s",
+ snprintf(fmt, sizeof fmt, "%s: %s, line %d: %s",
tag, tcpd_context.file, tcpd_context.line, format);
else
- sprintf(fmt, "%s: %s", tag, format);
+ snprintf(fmt, sizeof fmt, "%s: %s", tag, format);
vsyslog(severity, fmt, ap);
}