summaryrefslogtreecommitdiff
path: root/lib/libc/gen
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-12-19 09:43:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-12-19 09:43:17 +0000
commit00938515f58ac95a3c63c3cc9f65ba03076f1c11 (patch)
treee14371a24efceef9e249a8090139995d37b47c98 /lib/libc/gen
parent5ecc5933eaee11ce387ebbdf9fea38572843ecc6 (diff)
sprintf bye bye
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/timezone.c5
1 files changed, 3 insertions, 2 deletions
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 <sys/types.h>
@@ -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);
}