summaryrefslogtreecommitdiff
path: root/lib/libc/time/localtime.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-05 12:28:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-05 12:28:24 +0000
commitc2aaca546276d493b3bb0b37ccefe92b48ec5b65 (patch)
tree46336e3082bed59ed40fea34cafb844a214a8060 /lib/libc/time/localtime.c
parent558ba6bdd0df5b337aa6ae87ffa5aea6115f50c4 (diff)
1 char oflow
Diffstat (limited to 'lib/libc/time/localtime.c')
-rw-r--r--lib/libc/time/localtime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/time/localtime.c b/lib/libc/time/localtime.c
index ea5f177001d..cf496087a11 100644
--- a/lib/libc/time/localtime.c
+++ b/lib/libc/time/localtime.c
@@ -1,5 +1,5 @@
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: localtime.c,v 1.5 1996/08/25 10:11:11 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: localtime.c,v 1.6 1996/09/05 12:28:23 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -285,7 +285,7 @@ register struct state * const sp;
if (!doaccess && issetugid() == 0) {
if ((p = TZDIR) == NULL)
return -1;
- if ((strlen(p) + strlen(name) + 1) >= sizeof fullname)
+ if (strlen(p) + 1 + strlen(name) + 1 >= sizeof fullname)
return -1;
(void) strcpy(fullname, p);
(void) strcat(fullname, "/");