summaryrefslogtreecommitdiff
path: root/lib/libc/gen/timezone.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/timezone.c')
-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);
}