diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-19 07:12:43 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-19 07:12:43 +0000 |
commit | 36cb109beb9efb72a6d48ac7127a9f379657de1e (patch) | |
tree | b109e47cd2026a61932f39e6c8296632a44e5350 /lib/libwrap | |
parent | 8be025d256ee6bb72fd3f36daa2a1adc4b8011f1 (diff) |
use more snprintf
Diffstat (limited to 'lib/libwrap')
-rw-r--r-- | lib/libwrap/diag.c | 8 |
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); } |