From fe91160ec6df06b573bc2698b450092f90d7fc2b Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 5 Sep 1996 12:28:23 +0000 Subject: [PATCH] 1 char oflow --- lib/libc/time/localtime.c | 4 ++-- 1 file 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, "/"); -- 2.20.1