From 00938515f58ac95a3c63c3cc9f65ba03076f1c11 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 19 Dec 1997 09:43:17 +0000 Subject: sprintf bye bye --- lib/libc/gen/timezone.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/libc/gen') diff --git a/lib/libc/gen/timezone.c b/lib/libc/gen/timezone.c index 6086f67bb31..d9a05408981 100644 --- a/lib/libc/gen/timezone.c +++ b/lib/libc/gen/timezone.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: timezone.c,v 1.3 1997/07/09 00:28:25 millert Exp $"; +static char rcsid[] = "$OpenBSD: timezone.c,v 1.4 1997/12/19 09:43:16 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -129,6 +129,7 @@ _tztab(zone,dst) } else sign = '-'; - (void)sprintf(czone,"GMT%c%d:%02d",sign,zone / 60,zone % 60); + (void)snprintf(czone, sizeof czone, "GMT%c%d:%02d", + sign,zone / 60,zone % 60); return(czone); } -- cgit v1.2.3