summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-09-05 12:28:23 +0000
committerderaadt <deraadt@openbsd.org>1996-09-05 12:28:23 +0000
commitfe91160ec6df06b573bc2698b450092f90d7fc2b (patch)
tree6bd7f029df6c0f8f82a5898e4c9eca22bf9b3f2a
parentwhy was this crap still here... (diff)
downloadwireguard-openbsd-fe91160ec6df06b573bc2698b450092f90d7fc2b.tar.xz
wireguard-openbsd-fe91160ec6df06b573bc2698b450092f90d7fc2b.zip
1 char oflow
-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, "/");